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:

    The visual is sorely undervalued in modern scholarship. Art history has attained only a fraction of the conceptual sophistication of literary criticism.... Drunk with self-love, criticism has hugely overestimated the centrality of language to western culture. It has failed to see the electrifying sign language of images.
    Camille Paglia (b. 1947)

    Nothing and no one can destroy the Chinese people. They are relentless survivors. They are the oldest civilized people on earth. Their civilization passes through phases but its basic characteristics remain the same. They yield, they bend to the wind, but they never break.
    Pearl S. Buck (1892–1973)