Archive

Posts Tagged ‘count’

How to count total lines of code in VS.NET

January 19, 2009 Leave a comment

I’ve found this little neat string that can be used in the VS.NET integrated Find and gives your current project / solution / file total line count:

^~(:Wh@//.+)~(:Wh@\{:Wh@)~(:Wh@\}:Wh@)~(:Wh@/#).+

To use it, just press CTRL+SHIFT+F, then select Use Regular Expressions and finally write the file extensions in which you want to count the lines of code. 🙂

The results will be displayed at the Find result window‘s end.

Thanks go to Germán Schuager for the tip.