You have a
Console.ReadLine();
In your Loop. This “stops” the software and awaits user input, for example you can use this to get what the user typed. Long Story short: if you run your program und press repeatedly Enter it would work. I suggest changing it to
foreach (string f in lines)
{
Console.WriteLine(f);
}
Console.ReadLine();
This should work fine
solved C# File.ReadAllLines only recognizing the first line [closed]