Decimal.IConvertible.ToBoolean(IFormatProvider) Decimal.IConvertible.ToBoolean(IFormatProvider) Decimal.IConvertible.ToBoolean(IFormatProvider) Method

定義

如需這個成員的說明,請參閱 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);
Function ToBoolean (provider As IFormatProvider) As Boolean Implements IConvertible.ToBoolean

參數

provider
IFormatProvider IFormatProvider IFormatProvider

這個參數已忽略。This parameter is ignored.

傳回

如果目前執行個體的值不是零,則為 true,否則為 falsetrue if the value of the current instance is not zero; otherwise, false.

實作

備註

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

適用於