using (StreamReader sr = new StreamReader(@"C:\TextFile\text.txt"))
{
String line;
// Read line by line
while ((line = sr.ReadLine()) != null)
{
Console.WriteLine(line);
}
}
Console.ReadKey();
{
String line;
// Read line by line
while ((line = sr.ReadLine()) != null)
{
Console.WriteLine(line);
}
}
Console.ReadKey();
No comments:
Post a Comment