const string TextFilePath = @"C:\ReadTest.txt";
using (StreamReader reader = new StreamReader(TextFilePath))
{
string currentLine;
while ((currentLine = reader.ReadLine()) != null)
{
Console.WriteLine(currentLine);
}
}
using (StreamReader reader = new StreamReader(TextFilePath))
{
string currentLine;
while ((currentLine = reader.ReadLine()) != null)
{
Console.WriteLine(currentLine);
}
}
No comments:
Post a Comment