BitOperations.LeadingZeroCount Method

Definition

Overloads

LeadingZeroCount(UInt32)

Counts the number of leading zero bits in an unsigned 32-bit integer mask.

LeadingZeroCount(UInt64)

Counts the number of leading zero bits in an unsigned 64-bit integer mask.

LeadingZeroCount(UInt32)

Important

This API is not CLS-compliant.

Counts the number of leading zero bits in an unsigned 32-bit integer mask.

public:
 static int LeadingZeroCount(System::UInt32 value);
[System.CLSCompliant(false)]
public static int LeadingZeroCount (uint value);
static member LeadingZeroCount : uint32 -> int
Public Shared Function LeadingZeroCount (value As UInteger) As Integer

Parameters

value
UInt32

The mask.

Returns

The number of leading zero bits in a mask.

Attributes

Remarks

This method is similar in behavior to the x86 instruction LZCNT.

LeadingZeroCount(UInt64)

Important

This API is not CLS-compliant.

Counts the number of leading zero bits in an unsigned 64-bit integer mask.

public:
 static int LeadingZeroCount(System::UInt64 value);
[System.CLSCompliant(false)]
public static int LeadingZeroCount (ulong value);
static member LeadingZeroCount : uint64 -> int
Public Shared Function LeadingZeroCount (value As ULong) As Integer

Parameters

value
UInt64

The mask.

Returns

The number of leading zero bits in a mask.

Attributes

Remarks

This method is similar in behavior to the x86 instruction LZCNT.

Applies to