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:

    To write well, to have style ... is to paint. The master faculty of style is therefore the visual memory. If a writer does not see what he describes—countrysides and figures, movements and gestures—how could he have a style, that is originality?
    Rémy De Gourmont (1858–1915)

    A kiss can be a comma, a question mark or an exclamation point. That’s basic spelling that every woman ought to know.
    Mistinguett (1874–1956)