SyntaxFix
Write A Post
Hire A Developer
Questions
The easiest:
int lines = File.ReadAllLines("myfile").Length;