Upravit

Sdílet prostřednictvím


Char.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);
abstract member System.IConvertible.ToType : Type * IFormatProvider -> obj
override this.System.IConvertible.ToType : Type * IFormatProvider -> obj
Function ToType (type As Type, provider As IFormatProvider) As Object Implements IConvertible.ToType

Parameters

type
Type

A Type object.

provider
IFormatProvider

An IFormatProvider object.

Returns

An object of the specified type.

Implements

Exceptions

type is null.

The value of the current Char 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 Char instance is cast to an IConvertible interface. The recommended alternative is to call the ChangeType(Object, Type, IFormatProvider) method instead.

Applies to