4.4. EnumerationsAn enumeration appears as a group of related integer constants. All members of an enumeration share the same data type, and it must be an integral data type (Byte, Integer, Long, or Short, and alsoin 2005 or beyondSByte, UInteger, ULong, or UShort). The enumeration members are shared and read-only for the lifetime of the application. Public Enum VehicleType As Integer bicycle = 2 tricycle = 3 passengerCar = 4 eighteenWheeler = 18 End Enum They are used in code just like constants or variables. Dim whatIDrive As VehicleType whatIDrive = VehicleType.passengerCar Enumerations are declared at the namespace or module level only; you cannot define an enumeration within a procedure. |