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

定義

如需這個成員的說明,請參閱 ToType(Type, IFormatProvider)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);

參數

type
Type Type

Type 物件。A Type object.

傳回

指定類型的物件。An object of the specified type.

實作

例外狀況

typenulltype is null.

無法將目前 Char 物件的值轉換成 type 參數所指定的類型。The value of the current Char object cannot be converted to the type specified by the type parameter.

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 Char 執行個體轉換成 IConvertible 介面時,才能使用這個成員。It can be used only when the Char instance is cast to an IConvertible interface. 建議的替代做法是改為ChangeType(Object, Type, IFormatProvider)呼叫方法。The recommended alternative is to call the ChangeType(Object, Type, IFormatProvider) method instead.

適用於