using System;
using System.IO;
public class Example
{
public static void Main()
{
string fileName = @"C:examplepath.txt";
using (StreamReader streamReader = File.OpenText(fileName))
{
string text = streamReader.ReadToEnd();
string[] lines = text.Split(Environment.NewLine);
foreach (string line in lines) {
Console.WriteLine(line);
}
}
}
}