BigInteger.IsEven 屬性

定義

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

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

屬性值

Boolean

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

備註

這個屬性是方便的功能,指出值是否 BigInteger 平均由兩者區分。 它相當於下列運算式:

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

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

適用於