Name

Const Statement

Synopsis

[accessmodifier] Const constantname [As type] = constantvalue
accessmodifier optional; Keyword

One of the keywords Public, Private, Protected, Friend, or Protected Friend.

constantname required; String Literal

The name of the constant.

type optional; Keyword

The data type; it can be Byte, Boolean, Char, Short, Integer, Long, Single, Double, Decimal, Date, or String, as well as any of the data types defined in the Base Class Library.

constantvalue required; Numeric or String

A literal, constant, or any combination of literals and constants that includes arithmetic or logical operators, except Is.

Description

Associates a constant value with a name. This feature is provided to make code more readable. The name is referred to as a symbolic constant.

If Option Strict is on, the data type of the constant must be defined by using the As type clause.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset