Saturday, 3 December 2016

Calculate Lines of Code in Visual Studio

To calculate lines of code (LOC) in Visual Studio in your solution or project follow this small trick.
1.  Press CTRL+SHIFT+F. It will open a window “Find And Replace”
2.  In “Find options” select “Use Regular Expression”
3.  Use this regular expression
^(?([^\r\n])\s)*[^\s+?/]+[^\n]*$
blog05-01
4. Click Find All.