Constants and Enumerations in Visual Basic
Updated: July 20, 2015
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
Constants are a way to use meaningful names in place of a value that does not change. Constants store values that, as the name implies, remain constant throughout the execution of an application. You can use constants to provide meaningful names, instead of numbers, making your code more readable.
Enumerations provide a convenient way to work with sets of related constants, and to associate constant values with names. For example, you can declare an enumeration for a set of integer constants associated with the days of the week, and then use the names of the days rather than their integer values in your code.
|Constants Overview||Topics in this section describe constants and their uses.|
|Enumerations Overview||Topics in this section describe enumerations and their uses.|
|Const Statement||Describes the |
|Enum Statement||Describes the |
|Option Explicit Statement||Describes the |
|Option Infer Statement||Describes the |
|Option Strict Statement||Describes the |