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

适用于