Click or drag to resize
Enum Class
Provides the base class for enumerations.
Inheritance Hierarchy
SystemObject
  SystemValueType
    SystemEnum

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public abstract class Enum : ValueType, 
	IComparable, IFormattable, IConvertible

The Enum type exposes the following members.

Methods
  NameDescription
Public methodEquals
Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object).)
Public methodGetHashCode
Returns the hash code for the value of this instance.
(Overrides ValueTypeGetHashCode.)
Public methodStatic memberGetNames
Retrieves an array of the names of the constants in a specified enumeration.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberGetValues
Retrieves an array of the values of the constants in a specified enumeration.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberParse(Type, String)
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
Public methodStatic memberParse(Type, String, Boolean)
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. A parameter specifies whether the operation is case-insensitive.
Public methodStatic memberToObject(Type, Byte)
Converts the specified 8-bit unsigned integer to an enumeration member.
Public methodStatic memberToObject(Type, Int16)
Converts the specified 16-bit signed integer to an enumeration member.
Public methodStatic memberToObject(Type, Int32)
Converts the specified 32-bit signed integer to an enumeration member.
Public methodStatic memberToObject(Type, Int64)
Converts the specified 64-bit signed integer to an enumeration member.
Public methodStatic memberToObject(Type, Object)
Converts the specified object with an integer value to an enumeration member.
Public methodStatic memberToObject(Type, SByte)
Converts the specified 8-bit signed integer value to an enumeration member.
Public methodStatic memberToObject(Type, UInt16)
Converts the specified 16-bit unsigned integer value to an enumeration member.
Public methodStatic memberToObject(Type, UInt32)
Converts the specified 32-bit unsigned integer value to an enumeration member.
Public methodStatic memberToObject(Type, UInt64)
Converts the specified 64-bit unsigned integer value to an enumeration member.
Public methodToString
Converts the value of this instance to its equivalent string representation.
(Overrides ValueTypeToString.)
Public methodToString(IFormatProvider)
Public methodToString(String)
Converts the value of this instance to its equivalent string representation using the specified format.
Public methodToString(String, IFormatProvider)
This method overload is obsolete; use ToString(String).
Public methodStatic memberTryParseTEnum(String, TEnum)
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. The return value indicates whether the conversion succeeded.
Public methodStatic memberTryParseTEnum(String, Boolean, TEnum)
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. A parameter specifies whether the operation is case-sensitive. The return value indicates whether the conversion succeeded.
Top
See Also