BigInteger.IsEven 屬性

定義

表示目前 BigInteger 物件的值是否為偶數。

public:
 property bool IsEven { bool get(); };
public bool IsEven { get; }
member this.IsEven : bool
Public ReadOnly Property IsEven As Boolean

屬性值

如果 BigInteger 物件的值為偶數,則為 true,否則為 false

備註

此屬性是一項便利性功能,指出值是否由兩者 BigInteger 平均除。 它相當於下列運算式:

value % 2 == 0;
value Mod 2 = 0

如果目前 BigInteger 物件的 BigInteger.Zero值為 ,則屬性會傳 true回 。

適用於