473,484 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Commenting out VB code

Is there a better way to comment out code in VB than putting a single quote
in front of each and every line?
--
Sandy
Nov 19 '05 #1
5 4034
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" <Sa***@discussions.microsoft.com> wrote in message
news:87**********************************@microsof t.com...
Is there a better way to comment out code in VB than putting a single quote in front of each and every line?
--
Sandy

Nov 19 '05 #2
> 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" <Sa***@discussions.microsoft.com> wrote in message
news:87**********************************@microsof t.com... Is there a better way to comment out code in VB than putting a single
quote
in front of each and every line?
--
Sandy

Nov 19 '05 #3
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" <Sa***@discussions.microsoft.com> wrote in message
news:87**********************************@microsof t.com...
Is there a better way to comment out code in VB than putting a single
quote
in front of each and every line?
--
Sandy

Nov 19 '05 #4
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

Nov 19 '05 #5
> 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
Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
2428
by: Profetas | last post by:
Hi, I know that this is off topic. but I didn't know where to post. Do you comment your source code while coding or after coding. for example: you write a procedure and after it is...
4
7729
by: Ron McNulty | last post by:
Often when testing an app, I want to temporarily comment out sections of the App.config file. Is there any way to do this? Regards Ron
3
1318
by: Naveen Mukkelli | last post by:
Hi All, I'm trying to create XML commenting for my code using XML commenting feature for the first time. I'm using VS.NET 2003 and C#. I'v tried the following way. Step 1: set the file name...
18
1293
by: Marian F. | last post by:
The 12 years old genius function to count english words in a sentence: ' This is my function to count english words in your string ' s is the string with your words to be counted ' Returns an...
8
1843
by: lallous | last post by:
Hello I've been programming for a number of years, however my commenting style is always different. Sometimes I use something like: /************************ * method .... * comments......
2
1061
by: RYoung | last post by:
Can someone point me to a reference concerning source code commenting with VB 2005, ala C# commenting? I googled and found alot of links to add-ins and commercial products, but I can't find any...
1
1238
by: Wijaya Edward | last post by:
Hi all, I have the following code: import sys import re ham_count = 0 spam_count = 0
100
4605
by: Angel Tsankov | last post by:
Can someone recommend a good source of C/C++ coding style. Specifically, I am interested in commenting style and in particular how to indent comments and the commented code, rather than when to...
0
6950
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7103
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6811
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5403
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4841
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4527
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3044
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1355
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
588
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.