SyntaxFix
Write A Post
Hire A Developer
Questions
Change string[] lines = File.ReadLines("c:\\file.txt"); to IEnumerable<string> lines = File.ReadLines("c:\\file.txt"); The rest of your code should work fine.
string[] lines = File.ReadLines("c:\\file.txt");
IEnumerable<string> lines = File.ReadLines("c:\\file.txt");