using (var file = new StreamReader(fileName)) { string line; while((line = file.ReadLine()) != null) { System.Console.WriteLine(line); } }