Enumerated Type - Visual Basic/VBA

Visual Basic/VBA

Enumerated datatypes in Visual Basic (up to version 6) and VBA are automatically assigned the "Long" datatype and also become a datatype themselves:

Enum CardSuit Clubs Diamonds Hearts Spades End Enum Sub EnumExample Dim suit As CardSuit suit = Diamonds MsgBox suit End Sub

Example Code in vb.Net

Enum CardSuit Clubs Diamonds Hearts Spades End Enum Sub EnumExample Dim suit As CardSuit suit = CardSuit.Diamonds MsgBox(suit) End Sub

Read more about this topic:  Enumerated Type

Famous quotes containing the words visual and/or basic:

    Dialogue should simply be a sound among other sounds, just something that comes out of the mouths of people whose eyes tell the story in visual terms.
    Alfred Hitchcock (1899–1980)

    It is a strange fact that freedom and equality, the two basic ideas of democracy, are to some extent contradictory. Logically considered, freedom and equality are mutually exclusive, just as society and the individual are mutually exclusive.
    Thomas Mann (1875–1955)