What is the meaning of underscore in visual basic? I have this code:
Private _isAuthenticated As Boolean
Is that the same as doing this?
Private isAuthenticated As Boolean
Or does adding the underscore to the front of the name do something special?
It’s a convention. A leading _ often indicates that the variable is private to the class. This convention is commonly used in many different languages, not just VB.
In a similar sense, it also indicates that the variable is the local variable behind a property.
However it has no significant meaning to the compiler.