Keywords

Keywords are words with special meaning in a programming language. In Visual Basic .NET, keywords are reserved; that is, they cannot be used as tokens for such purposes as naming variables and subroutines. The keywords in Visual Basic .NET are shown in Table 2-1.

Table 2-1. Visual Basic .NET keywords

Keyword

Description

AddHandler

Visual Basic .NET Statement

AddressOf

Visual Basic .NET Statement

Alias

Used in the Declare statement

And

Boolean operator

AndAlso

Boolean operator

Ansi

Used in the Declare statement

Append

Used as a symbolic constant in the FileOpen function

As

Used in variable declaration (Dim, Friend, etc.)

Assembly

Assembly-level attribute specifier

Auto

Used in the Declare statement

Binary

Used in the Option Compare statement

Boolean

Used in variable declaration (intrinsic data type)

ByRef

Used in argument lists

Byte

Used in variable declaration (intrinsic data type)

ByVal

Used in argument lists

Call

Visual Basic .NET statement

Case

Used in the Select Case construct

Catch

Visual Basic .NET statement

CBool

Data-conversion function

CByte

Data-conversion function

CChar

Data-conversion function

CDate

Data-conversion function

CDec

Data-conversion function

CDbl

Data-conversion function

Char

Used in variable declaration (intrinsic data type)

CInt

Data-conversion function

Class

Visual Basic .NET statement

CLng

Data-conversion function

CObj

Get Programming Visual Basic .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.