asp.net.ph

Enum.ToObject Method ( Type, Int32 )

System Namespace   Enum Class


Returns an instance of the specified enumeration type set to the specified 32-bit signed integer value.

[ VB ]
<Serializable>
Overloads Public Shared Function ToObject ( _
   ByVal enumType As Type, _
   ByVal value As Integer _
) As Object

[ C# ]
[Serializable]
public static object ToObject (
   Type enumType,
   int value
);

[ C++ ]
[Serializable]
public: static Object* ToObject (
   Type* enumType,
   int value
);

[JScript ]
public Serializable
static function ToObject (
   enumType : Type,
   value : int
) : Object;

Parameters

enumType
The enumeration for which to create a value.
value
The value to set.

Return Value

An instance of the enumeration set to value.

Exceptions


Exception Type Condition
ArgumentNullException enumType is a null reference ( Nothing in Visual Basic ).
ArgumentException enumType is not an Enum.

See Also

Enum Members   Enum.ToObject Overload List Skip Navigation Links


Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note