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
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]*$
4. Click Find All.