A quick and easy way to comment out your codes in Microsoft Visual Studio is to use a keyboard shortcut using ctrl+k and ctrl+c or ctrl+u.
Advertisement
1 min read
To comment out lines using a shortcut, highlight the lines you want to convert and then press ctrl+k and then ctrl+c. If you want to uncomment, highlight the commented lines you want to convert back and then press ctrl+k and then ctrl+u.