Skip to content

Commit

Permalink
Aplicaciones de consola en C#.NET, Polo Tecnológico
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianNorbertoEscobar committed Jul 22, 2017
0 parents commit 499ab35
Show file tree
Hide file tree
Showing 267 changed files with 3,056 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Archivos/Archivos.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Archivos", "Archivos\Archivos.csproj", "{338B416A-79B5-4518-9506-2D787C24D4FE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{338B416A-79B5-4518-9506-2D787C24D4FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{338B416A-79B5-4518-9506-2D787C24D4FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{338B416A-79B5-4518-9506-2D787C24D4FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{338B416A-79B5-4518-9506-2D787C24D4FE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file added Archivos/Archivos.v12.suo
Binary file not shown.
6 changes: 6 additions & 0 deletions Archivos/Archivos/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
58 changes: 58 additions & 0 deletions Archivos/Archivos/Archivos.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{338B416A-79B5-4518-9506-2D787C24D4FE}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Archivos</RootNamespace>
<AssemblyName>Archivos</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
49 changes: 49 additions & 0 deletions Archivos/Archivos/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Archivos
{
class Program
{
static void Main(string[] args)
{
TextWriter archivo;
archivo = new StreamWriter("archivo.txt");

Console.WriteLine("\n Ingrese texto a grabar en un archivo:");

string mensaje = Console.ReadLine();
archivo.WriteLine(mensaje);

archivo.Close();
Console.WriteLine("\n El archivo se ha grabado exitosamente");

Console.ReadKey();

TextReader lector;
lector = new StreamReader("archivo.txt");

Console.WriteLine("\n Contenido del archivo:");
Console.WriteLine(lector.ReadToEnd());

lector.Close();
Console.WriteLine("\n El archivo se ha cerrado exitosamente");

StreamWriter escritor = File.AppendText("archivo.txt");

Console.WriteLine("\n Escriba texto a agregar al archivo:");

string nuevoTexto = Console.ReadLine();
escritor.WriteLine(nuevoTexto);

escritor.Close();
Console.WriteLine("\n Se ha agregado texto al archivo exitosamente");

Console.ReadKey();
}
}
}
36 changes: 36 additions & 0 deletions Archivos/Archivos/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// La información general sobre un ensamblado se controla mediante el siguiente
// conjunto de atributos. Cambie estos atributos para modificar la información
// asociada con un ensamblado.
[assembly: AssemblyTitle("Archivos")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Archivos")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Si establece ComVisible como false, los tipos de este ensamblado no estarán visibles
// para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
// COM, establezca el atributo ComVisible como true en este tipo.
[assembly: ComVisible(false)]

// El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM
[assembly: Guid("47085a1b-a799-4a11-92c8-655a42a59508")]

// La información de versión de un ensamblado consta de los cuatro valores siguientes:
//
// Versión principal
// Versión secundaria
// Número de compilación
// Revisión
//
// Puede especificar todos los valores o establecer como predeterminados los números de compilación y de revisión
// mediante el carácter '*', como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file added Archivos/Archivos/bin/Debug/Archivos.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions Archivos/Archivos/bin/Debug/Archivos.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
Binary file added Archivos/Archivos/bin/Debug/Archivos.pdb
Binary file not shown.
Binary file added Archivos/Archivos/bin/Debug/Archivos.vshost.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions Archivos/Archivos/bin/Debug/Archivos.vshost.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
11 changes: 11 additions & 0 deletions Archivos/Archivos/bin/Debug/Archivos.vshost.exe.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
2 changes: 2 additions & 0 deletions Archivos/Archivos/bin/Debug/archivo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hola Mundo
Chau Mundo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
I:\UNLaM\DESARROLLO WEB - POLO TECNOLÓGICO\C# - ASP.NET\C# - Aplicaciones de consola\Archivos\Archivos\bin\Debug\Archivos.exe.config
I:\UNLaM\DESARROLLO WEB - POLO TECNOLÓGICO\C# - ASP.NET\C# - Aplicaciones de consola\Archivos\Archivos\bin\Debug\Archivos.exe
I:\UNLaM\DESARROLLO WEB - POLO TECNOLÓGICO\C# - ASP.NET\C# - Aplicaciones de consola\Archivos\Archivos\bin\Debug\Archivos.pdb
I:\UNLaM\DESARROLLO WEB - POLO TECNOLÓGICO\C# - ASP.NET\C# - Aplicaciones de consola\Archivos\Archivos\obj\Debug\Archivos.csprojResolveAssemblyReference.cache
I:\UNLaM\DESARROLLO WEB - POLO TECNOLÓGICO\C# - ASP.NET\C# - Aplicaciones de consola\Archivos\Archivos\obj\Debug\Archivos.exe
I:\UNLaM\DESARROLLO WEB - POLO TECNOLÓGICO\C# - ASP.NET\C# - Aplicaciones de consola\Archivos\Archivos\obj\Debug\Archivos.pdb
Binary file not shown.
Binary file added Archivos/Archivos/obj/Debug/Archivos.exe
Binary file not shown.
Binary file added Archivos/Archivos/obj/Debug/Archivos.pdb
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Empty file.
22 changes: 22 additions & 0 deletions ArrayLists/ArrayLists.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArrayLists", "ArrayLists\ArrayLists.csproj", "{4D4D016A-34C1-45E9-B718-AF735556E96A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4D4D016A-34C1-45E9-B718-AF735556E96A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D4D016A-34C1-45E9-B718-AF735556E96A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D4D016A-34C1-45E9-B718-AF735556E96A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D4D016A-34C1-45E9-B718-AF735556E96A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file added ArrayLists/ArrayLists.v12.suo
Binary file not shown.
6 changes: 6 additions & 0 deletions ArrayLists/ArrayLists/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
60 changes: 60 additions & 0 deletions ArrayLists/ArrayLists/ArrayLists.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4D4D016A-34C1-45E9-B718-AF735556E96A}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ArrayLists</RootNamespace>
<AssemblyName>ArrayLists</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MostrarArrayList.cs" />
<Compile Include="MostrarHashTable.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
38 changes: 38 additions & 0 deletions ArrayLists/ArrayLists/MostrarArrayList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ArrayLists
{
public class MostrarArrayList
{
ArrayList Lista;

public MostrarArrayList()
{
Lista = new ArrayList();
}

public void CapturaDatos()
{
string cadena;

for (int i = 0; i < 3; i++)
{
cadena = Console.ReadLine();
Lista.Add(cadena);
}
}

public void ImprimeDatos()
{
foreach (var item in Lista)
{
Console.WriteLine(item);
}
}
}
}
46 changes: 46 additions & 0 deletions ArrayLists/ArrayLists/MostrarHashTable.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ArrayLists
{
public class MostrarHashTable
{
Hashtable Tabla;

public MostrarHashTable()
{
Tabla = new Hashtable();
}

public void AgregarDatos()
{
Tabla.Add("C001", "Producto 1");
Tabla.Add("J546", "Producto 2");
Tabla.Add("L899", "Producto 3");
Tabla.Add("M524", "Producto 4");
}

public void MostrarDatos()
{
Console.WriteLine("Existen " + Tabla.Count + " elementos. Dame la descripción del elemento con clave:");
string cadena = Console.ReadLine();

if (Tabla[cadena] == null)
Console.WriteLine("\n El elemento no existe");
else
{
Console.WriteLine("\n El elemento encontrado es:");
Console.WriteLine(Tabla[cadena]);
}
}

public void Eliminar(string key)
{
Tabla.Remove(key);
}
}
}
Loading

0 comments on commit 499ab35

Please sign in to comment.