Mono Class Library: System.Enum Overview | Members

System.Enum.ToObject Method

Returns an instance of the specified enumeration type set to the specified ulong value. [Edit]

[System.CLSCompliant(false)]
[System.Runtime.InteropServices.ComVisible(true)]
public static object ToObject (Type enumType, ulong value)

Parameters

enumType
The Type of an enumeration. [Edit]
value
The ulong value to set. [Edit]
value
Documentation for this section has not yet been entered. [Edit]

Returns

An enumeration object of type enumType whose value is value. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionenumType is a null reference. [Edit]
ArgumentExceptionenumType is not a Type that describes a Enum . [Edit]

Remarks

This member is not CLS-compliant. For a CLS-compliant alternative, use Enum.ToObject(Type, object)(Type, long ). [Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0