Tests that the specified value is zero or a positive power of two.

Namespace: SharpAssembler.Core
Assembly: SharpAssembler Core (in SharpAssembler Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static bool IsPowerOfTwo(
	uint value
)
Visual Basic
Public Shared Function IsPowerOfTwo ( _
	value As UInteger _
) As Boolean
Visual C++
public:
static bool IsPowerOfTwo(
	unsigned int value
)

Parameters

value
Type: System..::..UInt32
The value to test.

Return Value

trueTruetruetrue (True in Visual Basic) when the value is positive and a power of two, or zero.

Contracts