Mono Class Library: System.Enum Overview | Members

System.Enum.ToObject Method

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

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

Parameters

enumType
The Type of an enumeration. [Edit]
value
The int 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

Documentation for this section has not yet been entered. [Edit]

Requirements

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