BigInteger.IsPowerOfTwo 属性

定义

指示当前 BigInteger 对象的值是否是 2 的幂。

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

属性值

如果 BigInteger 对象的值是 2 的幂,则为 true;否则为 false

注解

此属性确定值是否 BigInteger 具有单个非零位集。 这意味着,如果当前BigInteger对象的值为 1 (即 20) 或任何大于 2 的幂,则返回 true 。 如果当前 BigInteger 对象的值为 0,则返回 false

适用于