In Visual Basic how do you create a block comment

vb.net

vb.net Problem Overview


> Possible Duplicate:
> commenting VB code

Does anybody know how to do a block comment in Visual Basic?

Note: I did a few searches on here and neither those results nor the results for 'Questions that may already have your answer' appeared to ask this question

vb.net Solutions


Solution 1 - vb.net

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

Solution 2 - vb.net

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

Solution 3 - vb.net

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

Solution 4 - vb.net

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCoopsView Question on Stackoverflow
Solution 1 - vb.netOdedView Answer on Stackoverflow
Solution 2 - vb.netJonView Answer on Stackoverflow
Solution 3 - vb.netMatthew LaytonView Answer on Stackoverflow
Solution 4 - vb.netuser1400312View Answer on Stackoverflow