Boolean.IConvertible.ToType(Type, IFormatProvider) Method

Definition

For a description of this member, see ToType(Type, IFormatProvider).

object IConvertible.ToType (Type type, IFormatProvider provider);
Parameters
type
Type

The desired type.

provider
IFormatProvider

An IFormatProvider implementation that supplies culture-specific information about the format of the returned value.

Returns

An object of the specified type, with a value that is equivalent to the value of this Boolean object.

Exceptions

type is null.

The requested type conversion is not supported.

Remarks

This member is an explicit interface member implementation. It can be used only when the Boolean instance is cast to an IConvertible interface. The recommended alternative is to call the Convert.ChangeType method.

Applies to