Search
Monday, November 12, 2018 ..:: Home ::.. Register  Login
   Calendar  
     
  
   Search  
     
  
   Blogroll  
     
  
   Disclosure  
All blog entries are the opinions of the author and do not necessarily reflect the opinions of their employer. All the code presented is for explanation and demonstration purposes only. Any damages incurred to your site and/or data are not the responsibility of the author. Every effort is taken to ensure the code properly compiles, however sometimes there are some hiccups and you might be required to do your own debugging.
     
  
   TechTidBits (Blog)  

Visual Studio TnT #1: toggling comments like a ninja!

Nov 13

Written by:
Saturday, November 13, 2010 9:22 PM  RssIcon

Visual Studio Tips'n'TricksWant to learn some cool new Visual Studio tips'n'tricks?  Read on!

Visual Studio Tips'n'TricksTip'n'Trick: Commenting and Uncommenting

Shortcut: Comment: CTRL+K, CTRL+C,Uncomment: CTRL+K, CTRL+U

Da "Peter" version (aka, ya, da verbose one)

Are you looking to become more proficient, efficient and just overall BETTER with Visual Studio?  Well, keep your browsers/RSS readers/WP7 phones, heck even your iPads to this blog and I'll show you some cool and hopefully new Visual Studio Tips'n'Tricks!

We'll start off this series with commenting/uncommenting your code.

Situation

  • Ever wanted to just comment out a section of code but didn't want to have to type out the "//" over and over on every line for 50 lines? 
  • Too bored to put the starting /* and the closing */ tag?
  • Ever wanted to "just try something out" with a piece of code but not remove it, just kind of "move it out of the way for a sec?"
  • You unsure if a piece of code is run, so you want to quickly comment run, analyis uncomment it back in?

If you've ever found yourself in this situation, you don't have to cut'n'paste the comment characters (//) on every single like, nor do you have to use the start comment and end comment tags (/* and */) for line groupings.  NO!  Select the code you want commented out, then use the CTRL+K, CTRL+C to comment and the inverse of that CTRL+K, CTRL+U to uncomment your selected text.

Now that you know how to comment and uncomment code like a pro, it's time to grab a coffee and get coding!

Tags:
Categories:
Location: Blogs Parent Separator TechTidBits

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
     
  
Copyright 1999-2012 by PCHenry.com   Terms Of Use  Privacy Statement