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.

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

Parameters

enumType
The Type of an enumeration.
value
The int value to set.
value
Documentation for this section has not yet been entered.

Returns

An enumeration object of type enumType whose value is value.

Exceptions

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

Remarks

Documentation for this section has not yet been entered.

Requirements

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