Bewerken

Delen via


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(UIntPtr)

Counts the number of leading zero bits in a mask. Similar in behavior to the x86 instruction LZCNT.

LeadingZeroCount(UInt32)

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

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);
[<System.CLSCompliant(false)>]
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.

Applies to

LeadingZeroCount(UInt64)

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

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);
[<System.CLSCompliant(false)>]
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

LeadingZeroCount(UIntPtr)

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

Important

This API is not CLS-compliant.

Counts the number of leading zero bits in a mask. Similar in behavior to the x86 instruction LZCNT.

public:
 static int LeadingZeroCount(UIntPtr value);
[System.CLSCompliant(false)]
public static int LeadingZeroCount (UIntPtr value);
[<System.CLSCompliant(false)>]
static member LeadingZeroCount : unativeint -> int
Public Shared Function LeadingZeroCount (value As UIntPtr) As Integer

Parameters

value
UIntPtr

unativeint

The value.

Returns

The count of leading zeros bits in a mask.

Attributes

Applies to