C# Read each line of file
using System;
using System.IO;
class Program
{
static void Main()
{
//
// It will free resources on its own.
//
string line;
using (StreamReader reader = new StreamReader("file.txt"))
{
line = reader.ReadLine();
}
Console.WriteLine(line);
}
}