String.IConvertible.ToType(Type, IFormatProvider) String.IConvertible.ToType(Type, IFormatProvider) Method

Definition

For a description of this member, see ToType(Type, IFormatProvider).

 virtual System::Object ^ System.IConvertible.ToType(Type ^ type, IFormatProvider ^ provider) = IConvertible::ToType;
object IConvertible.ToType (Type type, IFormatProvider provider);
Parameters
type
Type Type

The type of the returned object.

provider
IFormatProvider IFormatProvider

An object that provides culture-specific formatting information.

Returns

The converted value of the current String object.

Implements
Exceptions

The value of the current String object cannot be converted to the type specified by the type parameter.

Remarks

This member is an explicit interface member implementation. It can be used only when the String instance is cast to an IConvertible interface. The recommended alternative is to call the ChangeType method.

Applies to