using System.IO;var lines = File.ReadAllLines("/path/to/file.txt");using (var s = new StreamReader("/path/to/file.txt"))
{
while (true)
{
var line = await s.ReadLineAsync();
if (line is null) break;
Console.WriteLine(line);
}
}