Possible Duplicate:
commenting VB code
Lack of block comments in VB .NET?
How to?
Is there a way to comment out more than one line of code in vb.net using VS 2010?
This question is related to
vb.net
visual-studio-2010
comments
Highlight block of text, then:
Comment Block: Ctrl + K + C
Uncomment Block: Ctrl + K + U
Tested in Visual Studio 2012
VB.NET doesn't support for multi line comment.
The only way to do multi-line comments in VB.NET is to do a lot of single line comments('
).
Or just highlight the whole code and just use (Ctrl+E,C)
, (Ctrl+E,U)
to comment or uncomment.
Only in c# /* */
Or in ASP.NET html source using <!-- -->
.
Create a new toolbar and add the commands
Select your custom tookbar to show it.
You will then see the icons as mention by moriartyn
The only way I could do it in VS 2010 IDE was to highlight the block of code and hit ctrl-E and then C
I just learned this trick from a friend. Put your code inside these 2 statements and it will be commented out.
#if false
#endif
Source: Stackoverflow.com