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)

    The basic test of freedom is perhaps less in what we are free to do than in what we are free not to do. It is the freedom to refrain, withdraw and abstain which makes a totalitarian regime impossible.
    Eric Hoffer (1902–1983)