In Visual Studio 2008, is there a keyboard shortcut to comment/uncomment selected lines of code?
To comment out multiple code lines right-click and select Source > Add Block Comment. ( CTRL+SHIFT+/ ) To uncomment multiple code lines right-click and select Source > Remove Block Comment. ( CTRL+SHIFT+\ )
Comment Code Block Ctrl+K+C/Ctrl+K+U If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code. Ctrl+K+U will uncomment the code.
Press Ctrl + / To uncomment a line / lines: Select the required line(s).
For more good stuff, check Favorite Visual Studio keyboard shortcuts.
Look under the Edit->Advanced menu. I actually changed mine to CTRL-/, CTRL-/ so I can't remember what the original was.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With