1 using (System.IO.StreamReader sr = new System.IO.StreamReader(strFileName))
2 {
3 String line;
4 // Read and display lines from the file until the end of
5 // the file is reached.
6 while ((line = sr.ReadLine()) != null)
7 {
8 Console.WriteLine(line);
9 }
10 }
11