New methods are added to the System.IO.File class in .NET framework 4.0 for reading and writing text files.
ReadLines
In earlier version we have used File.ReadAllLines method which returns a string array of all lines in the file.
String[] lines = File.ReadAllLines(“file.txtâ€);