BigInteger.IsEven 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示當前 BigInteger 物件的值是否為偶數。
public:
property bool IsEven { bool get(); };
public bool IsEven { get; }
member this.IsEven : bool
Public ReadOnly Property IsEven As Boolean
屬性值
true 若物件 BigInteger 值為偶數;否則, false。
備註
此特性是一種便利性,用以判斷一個 BigInteger 值是否能被二整除。 它等價於以下表達式:
value % 2 == 0;
value Mod 2 = 0
若當前 BigInteger 物件的值為 BigInteger.Zero,則該性質返回 true。