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.
Inheritance Hierarchy
System. . :: . .Object
System. . :: . .ValueType
System..::..Enum
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public MustInherit Class Enum _
Inherits ValueType
[SerializableAttribute]
public abstract class Enum : ValueType
[SerializableAttribute]
public ref class Enum abstract : public ValueType
[<AbstractClass>]
[<SerializableAttribute>]
type Enum =
class
inherit ValueType
end
public abstract class Enum extends ValueType
The Enum type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Enum | Initializes a new instance of the Enum class. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Converts the value of this instance to its equivalent string representation. (Overrides Object. . :: . .ToString() () () ().) |
Top
Remarks
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.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.