Boolean.IConvertible.ToSingle(IFormatProvider) 方法

定義

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

 virtual float System.IConvertible.ToSingle(IFormatProvider ^ provider) = IConvertible::ToSingle;
float IConvertible.ToSingle (IFormatProvider provider);
abstract member System.IConvertible.ToSingle : IFormatProvider -> single
override this.System.IConvertible.ToSingle : IFormatProvider -> single
Function ToSingle (provider As IFormatProvider) As Single Implements IConvertible.ToSingle

參數

provider
IFormatProvider

This parameter is ignored.This parameter is ignored.

傳回

1 if this instance is true; otherwise, 0.1 if this instance is true; otherwise, 0.

實作

備註

這個成員是明確的介面成員實作。This member is an explicit interface member implementation. 只有在 Boolean 執行個體轉換成 IConvertible 介面時,才能使用這個成員。It can be used only when the Boolean instance is cast to an IConvertible interface. 建議的替代做法是呼叫 Convert.ToSingle(Boolean) 方法。The recommended alternative is to call the Convert.ToSingle(Boolean) method.

適用於