asp.net.ph

Convert.ChangeType Method ( Object, TypeCode )

System Namespace   Convert Class


Returns an Object with the specified TypeCode and whose value is equivalent to the specified object.

[ VB ]
Overloads Public Shared Function ChangeType ( _
   ByVal value As Object, _
   ByVal typeCode As TypeCode _
) As Object

[ C# ]
public static object ChangeType (
   object value,
   TypeCode typeCode
);

[ C++ ]
public: static Object* ChangeType (
   Object* value,
   TypeCode typeCode
);

[ JScript ]
public static function ChangeType (
   value : Object,
   typeCode : TypeCode
) : Object;

Parameters

value
An Object that implements the IConvertible interface.
typeCode
A TypeCode

Return Value

An object whose underlying TypeCode is typeCode and whose value is equivalent to value.

Exceptions


Exception Type Condition
InvalidCastException value does not implement IConvertible.
ArgumentException typeCode is invalid.

See Also

Convert Members   Convert.ChangeType Overload List Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

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

You can help support asp.net.ph