Export (0) Print
Expand All

Enum.ToObject Method

Returns an instance of the specified enumeration type set to the specified value.

Overload List

Returns an instance of the specified enumeration type set to the specified 8-bit unsigned integer value.

[Visual Basic] Overloads Public Shared Function ToObject(Type, Byte) As Object
[C#] public static object ToObject(Type, byte);
[C++] public: static Object* ToObject(Type*, unsigned char);
[JScript] public static function ToObject(Type, Byte) : Object;

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

[Visual Basic] Overloads Public Shared Function ToObject(Type, Short) As Object
[C#] public static object ToObject(Type, short);
[C++] public: static Object* ToObject(Type*, short);
[JScript] public static function ToObject(Type, Int16) : Object;

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

[Visual Basic] Overloads Public Shared Function ToObject(Type, Integer) As Object
[C#] public static object ToObject(Type, int);
[C++] public: static Object* ToObject(Type*, int);
[JScript] public static function ToObject(Type, int) : Object;

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

[Visual Basic] Overloads Public Shared Function ToObject(Type, Long) As Object
[C#] public static object ToObject(Type, long);
[C++] public: static Object* ToObject(Type*, __int64);
[JScript] public static function ToObject(Type, long) : Object;

Returns an instance of the specified enumeration set to the specified value.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function ToObject(Type, Object) As Object
[C#] public static object ToObject(Type, object);
[C++] public: static Object* ToObject(Type*, Object*);
[JScript] public static function ToObject(Type, Object) : Object;

Returns an instance of the specified enumeration type set to the specified 8-bit signed integer value. This method is not CLS-compliant.

[Visual Basic] Overloads Public Shared Function ToObject(Type, SByte) As Object
[C#] public static object ToObject(Type, sbyte);
[C++] public: static Object* ToObject(Type*, char);
[JScript] public static function ToObject(Type, SByte) : Object;

Returns an instance of the specified enumeration type set to the specified 16-bit unsigned integer value. This method is not CLS-compliant.

[Visual Basic] Overloads Public Shared Function ToObject(Type, UInt16) As Object
[C#] public static object ToObject(Type, ushort);
[C++] public: static Object* ToObject(Type*, unsigned short);
[JScript] public static function ToObject(Type, UInt16) : Object;

Returns an instance of the specified enumeration type set to the specified 32-bit unsigned integer value. This method is not CLS-compliant.

[Visual Basic] Overloads Public Shared Function ToObject(Type, UInt32) As Object
[C#] public static object ToObject(Type, uint);
[C++] public: static Object* ToObject(Type*, unsigned int);
[JScript] public static function ToObject(Type, UInt32) : Object;

Returns an instance of the specified enumeration type set to the specified 64-bit unsigned integer value. This method is not CLS-compliant.

[Visual Basic] Overloads Public Shared Function ToObject(Type, UInt64) As Object
[C#] public static object ToObject(Type, ulong);
[C++] public: static Object* ToObject(Type*, unsigned __int64);
[JScript] public static function ToObject(Type, UInt64) : Object;

See Also

Enum Class | Enum Members | System Namespace

Show:
© 2014 Microsoft