any problems with doing this?
int i = new StreamReader(\"file.txt\").ReadToEnd().Split(new char[] {\'\\n\'}).Length
Mayby this?
string file = new StreamReader("YourFile.txt").ReadToEnd(); string[] lines = file.Split('\n'); int countOfLines = lines.GetLength(0));