ToType()

IConvertible::ToType(const TypeInfo&, System::SharedPtr<System::IFormatProvider>) 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

Arguments

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.

Return Value

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

See Also