BigInteger.IsEven 属性

定义

指示当前 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

适用于