System Namespace Convert Class
Returns an Object with the specified Type and whose value is equivalent to the specified object. A parameter supplies culture-specific formatting information.
[ VB ]
Overloads Public Shared Function ChangeType ( _
ByVal value As Object, _
ByVal conversionType As Type, _
ByVal provider As IFormatProvider _
) As Object
[ C# ]
public static object ChangeType (
object value,
Type conversionType,
IFormatProvider provider
);
[ C++ ]
public: static Object* ChangeType (
Object* value,
Type* conversionType,
IFormatProvider* provider
);
[ JScript ]
public static function ChangeType (
value : Object,
conversionType : Type,
provider : IFormatProvider
) : Object;
- value
- An Object that implements the IConvertible interface.
- conversionType
- A Type.
- provider
- An IFormatProvider interface implementation that supplies culture-specific formatting information.
An object whose Type is conversionType and whose value is equivalent to value.
-or-
A null reference ( Nothing in Visual Basic ), if value and conversionType are null references ( Nothing ).
-or-
value, if the Type of value and conversionType are equal.
provider enables the user to specify culture-specific conversion information about the contents of value. For example, if value is a String that represents a number, provider could supply culture-specific information about the notation used to represent that number.
Convert Members Convert.ChangeType Overload List