Comment/ Un-Comment your code

Use Ctrl-K Ctrl-C to comment selection and Ctrl-K Ctrl-U to uncomment selection
This tip will work for both Visual Studio .NET 2003 and Visual Studio 2005.

I use this feature all the time. These commands will comment / uncomment the current line if there is no selection.

Based on the feedback and comments, it seems that people like tips about keyboard shortcuts, so I'll keep the keyboard shortcut tips coming.

Happy Editing!


Author: Deepika Haridas10 Jun 2009 Member Level: Gold   Points : 0


Good tip..

Keep contributing..


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: