Commenting out VB code

G

Guest

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

chuckdfoster

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

Chuck
 
K

Kevin Spencer

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.
 
S

Steve C. Orr [MVP, MCSD]

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.
 
G

Guest

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top