Comment Out Code, Quick
I never delete code -- you never know when you might want it back. So I spend a lot of time commenting out code. I do this so often, and mousing up to the menu takes so long, that I've memorized the keystroke combination for commenting/uncommenting code. It’s actually one of the few keystroke combinations -- other than Undo -- that I remember.
To comment a group of lines, first select the lines. Then, holding down the Control key throughout, press K, then C. To uncomment, hold down the Control key and press K, then U. (These two stroke combinations are called "chords.")
Do you have a Visual Studio tip, you'd like to share? Send it to me at email@example.com.
Posted by Peter Vogel on 04/19/2011 at 1:16 PM