System Namespace Convert Class
Returns an Object with the specified TypeCode 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 typeCode As TypeCode, _
ByVal provider As IFormatProvider _
) As Object
[ C# ]
public static object ChangeType (
object value,
TypeCode typeCode,
IFormatProvider provider
);
[ C++ ]
public: static Object* ChangeType (
Object* value,
TypeCode typeCode,
IFormatProvider* provider
);
[ JScript ]
public static function ChangeType (
value : Object,
typeCode : TypeCode,
provider : IFormatProvider
) : Object;
- value
- An Object that implements the IConvertible interface.
- typeCode
- A TypeCode.
- provider
- An IFormatProvider interface implementation that supplies culture-specific formatting information.
An object whose underlying TypeCode is typeCode and whose value is equivalent to value.
-or-
A null reference ( Nothing in Visual Basic ) if value is a null reference ( Nothing ) and typeCode is TypeCode.Empty.
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