Inoke C# code to find number of lines in text file having millions of records?

Hi,

The following is a sample using StremReader, FYI.

count = 0;
using (var sr = new StreamReader(filePath))
{
    while (sr.ReadLine() != null) {count++; }
}

Sample20220420-1.zip (2.6 KB)

Regards,

1 Like