Windows apps
Collapse the table of content
Expand the table of content

Enum Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides the base class for enumerations.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public abstract class Enum : ValueType

The Enum type exposes the following members.

Protected methodEnumInitializes a new instance of the Enum class.

Public methodEqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringConverts the value of this instance to its equivalent string representation. (Overrides Object..::..ToString()()()().)

An enumeration is a set of named constants whose underlying type is any integral type. If no underlying type is explicitly declared, Int32 is used. Enum is the base class for all enumerations in the .NET Framework.

Enum provides methods for comparing instances of this class, converting the value of an instance to its string representation, converting the string representation of a number to an instance of this class, and creating an instance of a specified enumeration and value.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2017 Microsoft