Count Line

How to CountLine in notepad file


Answer this question

Count Line

  • doobey

    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.



  • David Bridge

    Hi!

    TextReader tr;

    ...

    while(tr.ReadLine()!=null) counter++;



  • Count Line