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.

返回

其值与此实例值等效的 conversionType 类型的 Object 实例。An Object instance of type conversionType whose value is equivalent to the value of this instance.

适用于