Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 19, 2021 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/c0690c0ca0a4fe877035ea5c4ea1dd4b to your computer and use it in GitHub Desktop.
Save parzibyte/c0690c0ca0a4fe877035ea5c4ea1dd4b to your computer and use it in GitHub Desktop.
using System;
namespace LeerArchivoDeTextoCSharp
{
class Program
{
static void Main(string[] args)
{
/*
https://parzibyte.me/blog
*/
string ubicacionArchivo = "C:\\Users\\parzibyte\\Desktop\\archivo.txt";
System.IO.StreamReader archivo = new System.IO.StreamReader(ubicacionArchivo);
string linea;
while ((linea = archivo.ReadLine()) != null)
{
Console.WriteLine("Tenemos una línea:");
Console.WriteLine(linea);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment