In C#, what is the best way to get a count of the total number of lines in all the files in a directory and all of its subdirectories?
The obvious answer is to make a recursive function to go through all of the directories and use the strategy from this question to count the lines in each file. Is there a better/easier way?