Write your chunk, select it and press Ctrl+K, Ctrl+C to comment it.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With