Docsity

VB.NET Keywords, Identifiers, and Comments Explained, Study notes of Computer science

Toggle sidebar
bg1
VB.NET KEYWORDS
- A keyword is a reserved word with special meanings in the compiler, whose meaning cannot
be changed. Therefore, these keywords cannot be used as an identifier
in VB.NET programming such as class name, variable, function, module, etc.
- There are following reserved keyword available in the VB.NET language.
AddHandler AddressOf Alias And AndAlso As
Boolean ByRef Byte ByVal Call Case
Catch CBool CByte CChar CDate CDbl
CDec Char Cint Class CLng CObj
Const Continue CSByte CShort CSng CStr
CType CUnit CULng CUShort Date Decimal
Declare Default Delegate Dim DirectCast Do
Double Each Else Elseif End End if
Enum Erase Error Event Exit False
Finally For Friend Function Get GetType
GetXML
Namespace Global GoTO Handles If Implements
Imports In Inherits Integer Interface Is
pf3

Partial preview of the text

Download VB.NET Keywords, Identifiers, and Comments Explained and more Study notes Computer science in PDF only on Docsity!

VB.NET KEYWORDS

  • A keyword is a reserved word with special meanings in the compiler, whose meaning cannot be changed. Therefore, these keywords cannot be used as an identifier in VB.NET programming such as class name, variable, function, module, etc.
  • There are following reserved keyword available in the VB.NET language. AddHandler AddressOf Alias And AndAlso As Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDbl CDec Char Cint Class CLng CObj Const Continue CSByte CShort CSng CStr CType CUnit CULng CUShort Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else Elseif End End if Enum Erase Error Event Exit False Finally For Friend Function Get GetType GetXML Namespace Global GoTO Handles If Implements Imports In Inherits Integer Interface Is

isNot Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace Narrowing New Next Not Nothing Not Inheritable Not Overridable Object Of On Operator Option Optional Or OrElse Overloads Overridable Overrides ParamArray Partial Private Property Protected Public RaiseEvent ReadOnly ReDim REM Remove Handler Resume Return SByte Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TryCast TypeOf UInteger While Widening With WithEvents WhiteOnly Xor #Else IsReference TimeOfDay Append Auto VB.NET Identifiers

  • An identifier is used to identify the name of variable, function, class, or any other user-defined elements in the program.
  • An identifier should be the combination of letter, digit, and underscore. However, the first character of the identifier or variable name should start with alphabet letter or underscore (_) of any length.
  • There are various rules for identifier in VB.NET, as follows: