Does anyone know if there is a way to get VB.net to let me comment out a
large portion of codes? Like in C/C++, I was able to comment out using /*
...... */ I think there is something to do with "Define Debug Constant = 1"
but I am not sure how it works. thanks. 8 2561
It doesn't have anyline like that. However, the IDE has a 'Comment
Selection' and 'Uncomment Selection' functionality. You can select a block
of code, and perform the action. It's not as good, but it is better then
nothing.
"Ben" <Be*@discussions.microsoft.com> wrote in message
news:B9**********************************@microsof t.com... Does anyone know if there is a way to get VB.net to let me comment out a large portion of codes? Like in C/C++, I was able to comment out using /* ..... */ I think there is something to do with "Define Debug Constant = 1" but I am not sure how it works. thanks.
Ben,
Highlight the block of code and click the Comment or Uncomment buttons on
the Edit toolbar.
Kerry Moorman
"Ben" wrote: Does anyone know if there is a way to get VB.net to let me comment out a large portion of codes? Like in C/C++, I was able to comment out using /* ..... */ I think there is something to do with "Define Debug Constant = 1" but I am not sure how it works. thanks.
#If False Then
< the code you want to comment out goes here>
#End If Does anyone know if there is a way to get VB.net to let me comment out a large portion of codes? Like in C/C++, I was able to comment out using /* ..... */ I think there is something to do with "Define Debug Constant = 1" but I am not sure how it works. thanks.
"AMercer" <AM*****@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com... #If False Then < the code you want to comment out goes here> #End If
Does anyone know if there is a way to get VB.net to let me comment out a large portion of codes? Like in C/C++, I was able to comment out using /* ..... */ I think there is something to do with "Define Debug Constant = 1" but I am not sure how it works. thanks.
That won't work exactly how comments work. For example, anything in the #IF
.... #END IF directives must be compilable code. You can't have any syntax
errors in the code.
HTH,
Mythran
Mythran,
| That won't work exactly how comments work. For example, anything in the
#IF
| ... #END IF directives must be compilable code. You can't have any syntax
| errors in the code.
Odd! ;-) I've used #IF False on blocks of code that have syntax errors.
For example the following block contains a syntax error (3.7x is not a valid
literal). It compiles under VB.NET 2003.
Public Sub Main()
Dim s As Single
#If False Then
s = 3.7x
#End If
End Sub
I would expect it to compile as #if is one of the Conditional Compilation
statements.
Are there specific syntax errors that you have used that cause the above not
to work?
Hope this helps
Jay
"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote in message
news:eQ**************@TK2MSFTNGP14.phx.gbl...
|
| "AMercer" <AM*****@discussions.microsoft.com> wrote in message
| news:AC**********************************@microsof t.com...
| > #If False Then
| > < the code you want to comment out goes here>
| > #End If
| >
| >> Does anyone know if there is a way to get VB.net to let me comment out
a
| >> large portion of codes? Like in C/C++, I was able to comment out using
| >> /*
| >> ..... */ I think there is something to do with "Define Debug Constant
=
| >> 1"
| >> but I am not sure how it works. thanks.
|
| That won't work exactly how comments work. For example, anything in the
#IF
| ... #END IF directives must be compilable code. You can't have any syntax
| errors in the code.
|
| HTH,
| Mythran
|
"Ben" <Be*@discussions.microsoft.com> schrieb: Does anyone know if there is a way to get VB.net to let me comment out a large portion of codes? Like in C/C++, I was able to comment out using /* ..... */
The "Edit Text" toolbar and the "Edit" menu of VS.NET contains commands for
commenting out blocks of code.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
In article <AC**********************************@microsoft.co m>, AMercer wrote: #If False Then < the code you want to comment out goes here> #End If
Does anyone know if there is a way to get VB.net to let me comment out a large portion of codes? Like in C/C++, I was able to comment out using /* ..... */ I think there is something to do with "Define Debug Constant = 1" but I am not sure how it works. thanks.
Highlight the code, hit Ctrl-K, Ctrl-C. To uncomment, highlight code,
hit Ctrl-K, Ctrl-U
HTH
--
Tom Shelton [MVP]
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:uX**************@TK2MSFTNGP09.phx.gbl... Mythran, | That won't work exactly how comments work. For example, anything in the #IF | ... #END IF directives must be compilable code. You can't have any syntax | errors in the code.
Odd! ;-) I've used #IF False on blocks of code that have syntax errors.
For example the following block contains a syntax error (3.7x is not a valid literal). It compiles under VB.NET 2003.
Public Sub Main() Dim s As Single #If False Then s = 3.7x #End If
End Sub
I would expect it to compile as #if is one of the Conditional Compilation statements.
Are there specific syntax errors that you have used that cause the above not to work?
Hope this helps Jay
"Mythran" <ki********@hotmail.comREMOVETRAIL> wrote in message news:eQ**************@TK2MSFTNGP14.phx.gbl... | | "AMercer" <AM*****@discussions.microsoft.com> wrote in message | news:AC**********************************@microsof t.com... | > #If False Then | > < the code you want to comment out goes here> | > #End If | > | >> Does anyone know if there is a way to get VB.net to let me comment out a | >> large portion of codes? Like in C/C++, I was able to comment out using | >> /* | >> ..... */ I think there is something to do with "Define Debug Constant = | >> 1" | >> but I am not sure how it works. thanks. | | That won't work exactly how comments work. For example, anything in the #IF | ... #END IF directives must be compilable code. You can't have any syntax | errors in the code. | | HTH, | Mythran |
LOL I knew I should have double-checked before I posted the reply :( Sorry,
I was wrong. I could have sworn...but I was wrong :)
Thanks for the correction, hope they caught it :)
Mythran This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: qwweeeit |
last post by:
In analysing a very big application (pysol) made of almost
100 sources, I had the need to remove comments.
Removing the comments which take all the line is straightforward...
Instead for the...
|
by: Joseph |
last post by:
Hi,
I'm having bit of questions on recursive pointer. I have following
code that supports upto 8K files but when i do a file like 12K i get a
segment fault. I Know it is in this line of code. ...
|
by: Richard Sherratt |
last post by:
It's a database keeping info about people and is expected to contain
20,000 to 25,000 people. I could put a GoToPerson Combo on the form,
but the customer and I are not to keen on that. It makes...
|
by: Pete Davis |
last post by:
I'm having trouble dealing with bitmaps larger than about 10,000 pixels in
either direction.
I've tried using DrawImage and DrawImageUnscaled, but both give me out of
memory errors.
In my...
|
by: geerrxin |
last post by:
Hi,
I have a need to manipulate a large matrix, say, A(N,N) (of real) 8GB
which can't fit in physical memory (2 BG). But the nature of
computation
requires the operation on only a portion of...
|
by: =?Utf-8?B?TW9iaWxlTWFu?= |
last post by:
Hello everyone:
I am looking for everyone's thoughts on moving large amounts (actually, not
very large, but large enough that I'm throwing exceptions using the default
configurations).
We're...
|
by: zephyrus360 |
last post by:
This is about a technique to find the mod of a very large integer with a normal small integer.
I recently encountered this problem when I needed to compute the modulus of a very large number with...
|
by: raylopez99 |
last post by:
A quick sanity check, and I think I am correct, but just to make
sure: if you have a bunch of objects that are very much like one
another you can uniquely track them simply by using an ArrayList...
|
by: polas |
last post by:
Afternoon all. I was just wondering about this point - I have
(generally) used // for commenting a single line in C, but from
looking at code other people have written it seems many use /* */...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
| |