Single.IConvertible.ToBoolean(IFormatProvider) Method

Definition

有关此成员的说明,请参见 ToBoolean(IFormatProvider)For a description of this member, see ToBoolean(IFormatProvider).

 virtual bool System.IConvertible.ToBoolean(IFormatProvider ^ provider) = IConvertible::ToBoolean;
bool IConvertible.ToBoolean (IFormatProvider provider);
abstract member System.IConvertible.ToBoolean : IFormatProvider -> bool
override this.System.IConvertible.ToBoolean : IFormatProvider -> bool
Function ToBoolean (provider As IFormatProvider) As Boolean Implements IConvertible.ToBoolean

Parameters

provider
IFormatProvider

该参数将被忽略。This parameter is ignored.

Returns

Boolean

如果当前实例的值不为零,则为 true;否则为 falsetrue if the value of the current instance is not zero; otherwise, false.

Implements

Remarks

此成员是显式接口成员实现。This member is an explicit interface member implementation. 它只能在 Single 实例被强制转换为 IConvertible 接口时使用。It can be used only when the Single instance is cast to an IConvertible interface. 建议的替代项是调用 Convert.ToBoolean(Single) 方法。The recommended alternative is to call the Convert.ToBoolean(Single) method.

Applies to