3
It’s like I put multiple-line comments in Visual Basic?
3
It’s like I put multiple-line comments in Visual Basic?
5
Unfortunately, there is no way to create a multi-line comment in the BASIC language, but there are some "tricks" that we can do:
Trick 1: #If
You can try creating blocks #If
with nonexistent expressions, this compiler will ignore the block. Example:
#If Comentario Then
Isso é
um comentário
de várias linhas
#End If
Trick 2: REM
Same thing as the character '
, you can set as in the example:
REM linha 1
REM linha 2
REM linha 3
Trick 3: Ctrl+K, Ctrl+C (Visual Studio 2008 only+)
This is simple, just enter the code, select what you want to comment and press Ctrl+K (only in Visual Studio 2008+)
1
Faster and easier mode (has buttons on top panel):
Browser other questions tagged vb.net visual-basic-6 comments
You are not signed in. Login or sign up in order to post.
This shortcut is to Visual Studio Code or to Visual Basic??
– hugocsl
To both, because try to use the same pattern. I confirmed by looking in the documentation.
– Eduardo Dumke