Returns an instance of the given enumeration type set to the given value.
[Visual Basic] Overloads Public Shared Function ToObject( _ ByVal enumType As Type, _ ByVal value As UInt64 _ ) As Object [C#] public static object ToObject( Type enumType, ulong value ); [C++] public: static Object* ToObject( Type* enumType, unsigned __int64 value ); [JScript] public static function ToObject( enumType : Type, value : UInt64 ) : Object;
An instance of the enumeration set to the given value.
Exception Type | Condition |
---|---|
ArgumentNullException | The enumType parameter is a null reference (in Visual Basic Nothing). |
ArgumentException | The enumType parameter is not an Enum type. |
Enum Class | Enum Members | System Namespace | Enum.ToObject Overload List