BigInteger.IsPowerOfTwo Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Indicates whether the value of the current BigInteger object is a power of two.

Namespace:  System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

Syntax

'Declaration
Public ReadOnly Property IsPowerOfTwo As Boolean
public bool IsPowerOfTwo { get; }

Property Value

Type: System.Boolean
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.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.