System::IConvertible::ToType 方法

IConvertible::ToType method

将此实例的值转换为指定 System::Type 的 System::Object,且具有等效值,使用指定的区域特定格式化信息。

virtual System::SharedPtr<System::Object> System::IConvertible::ToType(const TypeInfo &conversionType, System::SharedPtr<System::IFormatProvider> provider)=0
参数类型描述
conversionTypeconst TypeInfo&此实例的值转换为的 System::Type。
providerSystem::SharedPtr<System::IFormatProvider>提供区域特定格式化信息的 System::IFormatProvider 接口实现。

ReturnValue

类型为 conversionType 的 System::Object 实例,其值等同于此实例的值。

另见