asp.net.ph

Convert.ChangeType Method ( Object, Type )

System Namespace   Convert Class


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

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

[ C# ]
public static object ChangeType (
   object value,
   Type conversionType
);

[ C++ ]
public: static Object* ChangeType (
   Object* value,
   Type* conversionType
);

[ JScript ]
public static function ChangeType (
   value : Object,
   conversionType : Type
) : Object;

Parameters

value
An Object that implements the IConvertible interface.
conversionType
A Type.

Return Value

An object whose Type is conversionType and whose value is equivalent to value.

Exceptions


Exception Type Condition
InvalidCastException value does not implement IConvertible.

Remarks

This method uses the current thread's culture for the conversion.

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