Home > Tutorial > Visual studio tips and tricks > Comment and Uncomment .Net code

Comment and Uncomment .Net code

Email | Print
To comment and uncomment the block of .net code using shortcut keys will save the time rather then using comment and uncomment options in toolbar. Initially it will be bit difficult to use these short cuts but if you practice with this shortcut key really it’s very helpful. Below is the short keys

Comment: Ctrl+K, Ctrl+C – to comment the selected block of .net code. Press and hold the control key and press K then C.

Uncomment: Ctrl+K, Ctrl+U- to uncomment the select block of .net code. Press and hold the control key and press K then U.



Same above, we can achieve through using options in visual studio toolbar see the below screen shot.



Also get this same function in Edit menu, Click Edit menu->Advanced->Click Comment Select or Uncomment selection. See the below screen shot.

Comment-and-Uncomment in menu

So better way to use keyboard short cut to comment and uncomment selected block of code and save time.


« Intelli-sense suggestions »
Like this tutorial? Bookmark and Share:

Latest Posts