如何：引用枚举成员 (Visual Basic)How to: Refer to an Enumeration Member (Visual Basic)
枚举提供了一种简便的方法来处理相关常量集，并将常量值与名称相关联。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.
引用枚举成员To refer to an enumeration member
用枚举限定成员名称。Qualify the member name with the enumeration. 例如，下面的示例将
DayValue。For example, the following example assigns the
Saturdaymember of the
FirstDayOfWeekenumeration to the variable
DayValue = FirstDayOfWeek.Saturday