C# – Read a text file line by line
There are two simple ways to read a text file line by line: Here’s an example of using File.ReadLines() to read a file line by line in a loop: This outputs the file’s lines: Here’s an example of using File.ReadAllLines() to read the same file into a string array and then loop through it. Skip … Read more