[Solved] Read txt file from line to line to list?


// Retrieve 10 lines from Somefile.txt, starting from line 1
string filePath = "C:\\Somefile.txt";
int startLine = 1;
int lineCount = 10;
var fileLines = System.IO.File.ReadAllLines(filePath)
                .Skip((startLine-1))
                .Take(lineCount);

solved Read txt file from line to line to list?