Name

Enum Statement

Synopsis


accessmodifier Enum name [As type]
   membername [= constantexpression]
   membername [= constantexpression]
   ...
End Enum
accessmodifier optional; Keyword

Possible values are Public, Private, Friend, Protected, or Protected Friend

name required; String literal

The name of the enumerated data type

membername required; String literal

The name of a member of the enumerated data type

constantexpression optional; Long

The value to be assigned to membername

type optional; Keyword

The data type of the enumeration. All enumerated members must be integers; possible values are Byte, Short, Integer, and Long

Description

Defines an enumerated data type. All of the values of the data type are defined by the instances of membername.

Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.