共用方式為


Constants in Visual Basic 

Constants store values that, as the name implies, remain constant throughout the execution of an application. Use constants in your code for values that are used repeatedly or to make code more readable.

In This Section

  • How to: Declare A Constant
    Explains how to use the Const statement to declare a constant and set its value; by declaring a constant, you assign a meaningful name to the value.
  • User-Defined Constants
    Describes how to create your own constants, including information on scoping and how to avoid circular references.

Reference

  • Enumerations Overview
    Discusses enumerations and their use, including common tasks involving enumerations.