473,609 Members | 2,245 Online
Bytes | Software Development & Data Engineering Community
+ 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 4041
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***@discussi ons.microsoft.c om> wrote in message
news:87******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c om> wrote in message
news:87******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c om> wrote in message
news:87******** *************** ***********@mic rosoft.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
2460
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 working, you'll comment it.
4
7738
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
1332
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 for xml file in "Project Properties | Configuration Properties | Build | XML Documentation File"
18
1305
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 integer as the number of words found Public Function iCW(ByVal s As String) As Integer ' We start declaring the variable to count words Dim c As Integer ' This is the variable used in the for next loop ' to check every char in your string s
8
1856
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
1074
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 info on whether documentation generation is supported with VB 2005 using xml comments. Thanks, Ron
1
1244
by: Wijaya Edward | last post by:
Hi all, I have the following code: import sys import re ham_count = 0 spam_count = 0
100
4694
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 use comments. Thanks in advance! -- http://www.gotw.ca/resources/clcm.htm for info about ]
0
8111
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8197
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6973
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6042
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5503
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4006
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2509
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 we have to send another system
0
1372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.