BigInteger.IsPowerOfTwo Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates whether the value of the current BigInteger object is a power of two.
public:
property bool IsPowerOfTwo { bool get(); };
public bool IsPowerOfTwo { get; }
member this.IsPowerOfTwo : bool
Public ReadOnly Property IsPowerOfTwo As Boolean
Property Value
true
if the value of the BigInteger object is a power of two; otherwise, false
.
Remarks
This property determines whether a BigInteger value has a single non-zero bit set. This means that it returns true
if the value of the current BigInteger object is 1 (that is, 20) or any greater power of two. It returns false
if the value of the current BigInteger object is 0.