Software Development Network>> Visual C#>> Count Line
Atilla Koklu wrote:How to CountLine in notepad file
You could read blocks at a time and count the \r\n occurrences. That way you avoid having to load the entire file into memory all at once.
Hi!
TextReader tr;
...
while(tr.ReadLine()!=null) counter++;
Count Line
AdamAeroGuy
You could read blocks at a time and count the \r\n occurrences. That way you avoid having to load the entire file into memory all at once.
brenzy
Hi!
TextReader tr;
...
while(tr.ReadLine()!=null) counter++;