หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
An enumeration is the best way to group related constants together. You create an enumeration with the Enum statement in the declarations section of a class or a module. For more information, see How to: Declare an Enumeration.
To group related constant values
Write a declaration that includes a code access level, the
Enumkeyword, and a valid name. This example creates thePrivateenumeration,temperatureValues.Private Enum temperatureValuesDefine the constants in the enumeration. This example creates the
PublicenumerationtemperatureValuesand assigns its values.Public Enum temperatureValues Scorching Hot Lukewarm Cool Cold End Enum