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

定義

使用指定的特定文化特性之格式資訊,將這個執行個體的值轉換為具有等值的指定 ObjectTypeConverts the value of this instance to an Object of the specified Type that has an equivalent value, using the specified culture-specific formatting information.

public:
 System::Object ^ ToType(Type ^ conversionType, IFormatProvider ^ provider);
public object ToType (Type conversionType, IFormatProvider provider);
abstract member ToType : Type * IFormatProvider -> obj
Public Function ToType (conversionType As Type, provider As IFormatProvider) As Object

參數

conversionType
Type Type Type Type

這個執行個體的值要轉換成的 TypeThe Type to which the value of this instance is converted.

provider
IFormatProvider IFormatProvider IFormatProvider IFormatProvider

IFormatProvider 介面實作,提供特定文化特性的格式資訊。An IFormatProvider interface implementation that supplies culture-specific formatting information.

傳回

型別 conversionTypeObject 執行個體,其值等於這個執行個體的值。An Object instance of type conversionType whose value is equivalent to the value of this instance.

適用於