String.IConvertible.ToBoolean(IFormatProvider) Method

Definition

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

bool IConvertible.ToBoolean (IFormatProvider provider);
Parameters
provider
IFormatProvider

This parameter is ignored.

Returns

true if the value of the current string is TrueString; false if the value of the current string is FalseString.

Exceptions

The value of the current string is not TrueString or FalseString.

Remarks

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

Applies to