ערוך

שתף באמצעות


BitOperations.IsPow2 Method

Definition

Overloads

IsPow2(UIntPtr)

Determines whether the specified integral value is a power of 2.

IsPow2(UInt32)

Evaluates whether the specified UInt32 value is a power of two.

IsPow2(UInt64)

Evaluates whether the specified UInt64 value is a power of two.

IsPow2(Int64)

Evaluates whether the specified Int64 value is a power of two.

IsPow2(Int32)

Evaluates whether the specified Int32 value is a power of two.

IsPow2(IntPtr)

Determines whether the specified integral value is a power of 2.

IsPow2(UIntPtr)

Source:
BitOperations.cs
Source:
BitOperations.cs
Source:
BitOperations.cs

Important

This API is not CLS-compliant.

Determines whether the specified integral value is a power of 2.

public:
 static bool IsPow2(UIntPtr value);
[System.CLSCompliant(false)]
public static bool IsPow2 (UIntPtr value);
[<System.CLSCompliant(false)>]
static member IsPow2 : unativeint -> bool
Public Shared Function IsPow2 (value As UIntPtr) As Boolean

Parameters

value
UIntPtr

unativeint

The value.

Returns

true if the value is a power of 2; false otherwise.

Attributes

Applies to

IsPow2(UInt32)

Source:
BitOperations.cs
Source:
BitOperations.cs
Source:
BitOperations.cs

Important

This API is not CLS-compliant.

Evaluates whether the specified UInt32 value is a power of two.

public:
 static bool IsPow2(System::UInt32 value);
[System.CLSCompliant(false)]
public static bool IsPow2 (uint value);
[<System.CLSCompliant(false)>]
static member IsPow2 : uint32 -> bool
Public Shared Function IsPow2 (value As UInteger) As Boolean

Parameters

value
UInt32

The value to evaluate as being a power of two.

Returns

true if the specified value is a power of two; false otherwise.

Attributes

Applies to

IsPow2(UInt64)

Source:
BitOperations.cs
Source:
BitOperations.cs
Source:
BitOperations.cs

Important

This API is not CLS-compliant.

Evaluates whether the specified UInt64 value is a power of two.

public:
 static bool IsPow2(System::UInt64 value);
[System.CLSCompliant(false)]
public static bool IsPow2 (ulong value);
[<System.CLSCompliant(false)>]
static member IsPow2 : uint64 -> bool
Public Shared Function IsPow2 (value As ULong) As Boolean

Parameters

value
UInt64

The value to evaluate as being a power of two.

Returns

true if the specified value is a power of two; false otherwise.

Attributes

Applies to

IsPow2(Int64)

Source:
BitOperations.cs
Source:
BitOperations.cs
Source:
BitOperations.cs

Evaluates whether the specified Int64 value is a power of two.

public:
 static bool IsPow2(long value);
public static bool IsPow2 (long value);
static member IsPow2 : int64 -> bool
Public Shared Function IsPow2 (value As Long) As Boolean

Parameters

value
Int64

The value to evaluate as being a power of two.

Returns

true if the specified value is a power of two; false otherwise.

Applies to

IsPow2(Int32)

Source:
BitOperations.cs
Source:
BitOperations.cs
Source:
BitOperations.cs

Evaluates whether the specified Int32 value is a power of two.

public:
 static bool IsPow2(int value);
public static bool IsPow2 (int value);
static member IsPow2 : int -> bool
Public Shared Function IsPow2 (value As Integer) As Boolean

Parameters

value
Int32

The value to evaluate as being a power of two.

Returns

true if the specified value is a power of two; false otherwise.

Applies to

IsPow2(IntPtr)

Source:
BitOperations.cs
Source:
BitOperations.cs
Source:
BitOperations.cs

Determines whether the specified integral value is a power of 2.

public:
 static bool IsPow2(IntPtr value);
public static bool IsPow2 (IntPtr value);
static member IsPow2 : nativeint -> bool
Public Shared Function IsPow2 (value As IntPtr) As Boolean

Parameters

value
IntPtr

nativeint

The value.

Returns

true if the value is a power of 2; false otherwise.

Applies to