System::IConvertible::ToType method

IConvertible::ToType method

Converts the value of this instance to a System::Object of the specified System::Type that has an equivalent value, using the specified culture-specific formatting information.

virtual System::SharedPtr<System::Object> System::IConvertible::ToType(const TypeInfo &conversionType, System::SharedPtr<System::IFormatProvider> provider)=0
ParameterTypeDescription
conversionTypeconst TypeInfo&The System::Type to which the value of this instance is converted.
providerSystem::SharedPtr<System::IFormatProvider>A System::IFormatProvider interface implementation that supplies culture-specific formatting information.

ReturnValue

A System::Object instance of type conversionType whose value is equivalent to the value of this instance.

See Also