Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Visual Basic how do you create a block comment [duplicate]

Tags:

vb.net

People also ask

How do you comment multiple lines in Visual Basic?

Write your chunk, select it and press Ctrl+K, Ctrl+C to comment it.

How do I comment a block in Visual Studio?

Comment Code Block Ctrl+K+C/Ctrl+K+U If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code. Ctrl+K+U will uncomment the code.

How do you comment multiple lines in Visual Studio 2010?

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.

How do I comment in a VB Script?

The apostrophe is the special character VBScript uses as its comment initiator. The comment in VBScript works by making the VBScript interpreter ignore everything to the right of the apostrophe until a newline is reached.


There is no block comment in VB.NET.

You need to use a ' in front of every line you want to comment out.

In Visual Studio you can use the keyboard shortcuts that will comment/uncomment the selected lines for you:

Ctrl + K, C to comment

Ctrl + K, U to uncomment


There's not a way as of 11/2012, HOWEVER

Highlight Text (In visual Studio.net)

ctrl + k + c, ctrl + k + u

Will comment / uncomment, respectively


Not in VB.NET, you have to select all lines at then Edit, Advanced, Comment Selection menu, or a keyboard shortcut for that menu.

http://bytes.com/topic/visual-basic-net/answers/376760-how-block-comment

http://forums.asp.net/t/1011404.aspx/1


In Visual Studio .NET you can do Ctrl + K then C to comment, Crtl + K then U to uncomment a block.