I'm using next code to count lines in a text i have. It's work fine but I don't want to count empty lines. How can I do it, but with saving the current code format?
var lineCount = 0;
using (var readerlines = File.OpenText(strfilename))
{
while (readerlines.ReadLine() != null)
{
lineCount++;
}
}