Commenting out VB code

Discussion in 'ASP .Net' started by =?Utf-8?B?U2FuZHk=?=, Feb 2, 2005.

  1. Is there a better way to comment out code in VB than putting a single quote
    in front of each and every line?
    --
    Sandy
    =?Utf-8?B?U2FuZHk=?=, Feb 2, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?U2FuZHk=?=

    chuckdfoster Guest

    You can select all of the text you want to comment out and press CTRL-K. To
    uncomment press CTRL-K, CTRL-U.

    Chuck

    "Sandy" <> wrote in message
    news:...
    > Is there a better way to comment out code in VB than putting a single

    quote
    > in front of each and every line?
    > --
    > Sandy
    chuckdfoster, Feb 2, 2005
    #2
    1. Advertising

  3. > Is there a better way to comment out code in VB than putting a single
    > quote
    > in front of each and every line?


    You could always skip putting the single quotes in front of the lines you
    DON'T want to comment out... ;-)

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "Sandy" <> wrote in message
    news:...
    > Is there a better way to comment out code in VB than putting a single
    > quote
    > in front of each and every line?
    > --
    > Sandy
    Kevin Spencer, Feb 2, 2005
    #3
  4. On the "Text Editing" toolbar of Visual Studio.NET there are two buttons,
    one to automatically comment out the selected lines of text, and another to
    uncomment them. I use these buttons religiously.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "Sandy" <> wrote in message
    news:...
    > Is there a better way to comment out code in VB than putting a single
    > quote
    > in front of each and every line?
    > --
    > Sandy
    Steve C. Orr [MVP, MCSD], Feb 2, 2005
    #4
  5. Thanks All!

    "Sandy" wrote:

    > Is there a better way to comment out code in VB than putting a single quote
    > in front of each and every line?
    > --
    > Sandy
    =?Utf-8?B?U2FuZHk=?=, Feb 3, 2005
    #5
  6. > Is there a better way to comment out code in VB than putting a single quote
    > in front of each and every line?


    Sometimes I comment out a large block of code by surrounding it with a
    conditional compile directive, like this:

    #If 0 Then
    <code here is commented out>
    #End If
    =?Utf-8?B?Sm9uWg==?=, Feb 3, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. patrick

    java commenting out of code

    patrick, Jan 11, 2006, in forum: Java
    Replies:
    4
    Views:
    5,187
    Malte Christensen
    Jan 11, 2006
  2. Michael

    Commenting out debug code

    Michael, May 27, 2004, in forum: C++
    Replies:
    3
    Views:
    457
  3. Paul McNett

    Re: commenting out blocks of code

    Paul McNett, Feb 18, 2006, in forum: Python
    Replies:
    1
    Views:
    608
    Cameron Laird
    Feb 18, 2006
  4. Peter Hansen

    Re: commenting out blocks of code

    Peter Hansen, Feb 18, 2006, in forum: Python
    Replies:
    8
    Views:
    1,295
    Neil Hodgson
    Feb 20, 2006
  5. Jean-Paul Calderone

    Re: commenting out blocks of code

    Jean-Paul Calderone, Feb 18, 2006, in forum: Python
    Replies:
    0
    Views:
    468
    Jean-Paul Calderone
    Feb 18, 2006
Loading...

Share This Page