How to: Add a Comment to Your Code (Visual Basic)
This example shows comments occupying an entire source code line, part of a line, and more than one line.
' This entire line is a comment. Dim DailyTotal As Decimal = 0 ' Sales total for today. ' This comment is so long that it requires more than one line, so ' the comment character (') must be repeated on the second line.
This code example is also available as an IntelliSense code snippet. In the code snippet picker, it is located in Visual Basic Language. For more information, see.
Compiling the Code
This example requires:
A reference to thenamespace.
You cannot continue a comment using the line-continuation sequence ( _). You must repeat the comment character (') at the beginning of each line of a comment.