Boolean.IConvertible.ToByte(IFormatProvider) 方法

定義

如需這個成員的說明,請參閱 ToByte(IFormatProvider)For a description of this member, see ToByte(IFormatProvider).

 virtual System::Byte System.IConvertible.ToByte(IFormatProvider ^ provider) = IConvertible::ToByte;
byte IConvertible.ToByte (IFormatProvider provider);
Function ToByte (provider As IFormatProvider) As Byte Implements IConvertible.ToByte

參數

provider
IFormatProvider

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

傳回

如果這個執行個體為 true,則為 1,否則為 0。1 if the value of 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.ToByte 方法。The recommended alternative is to call the Convert.ToByte method.

適用於

另請參閱