IConvertible.ToType(Type, IFormatProvider) Method

Definition

Converts 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 object ToType (Type conversionType, IFormatProvider provider);
Parameters
conversionType
Type

The Type to which the value of this instance is converted.

provider
IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

An Object instance of type conversionType whose value is equivalent to the value of this instance.

Applies to