BitHelper.SetRange Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetRange(UInt32, Byte, Byte, UInt32) |
Sets a bit field range within a target value. |
SetRange(UInt32, Byte, Byte, UInt32) |
Sets a bit field range within a target value. |
SetRange(UInt64, Byte, Byte, UInt64) |
Sets a bit field range within a target value. |
SetRange(UInt64, Byte, Byte, UInt64) |
Sets a bit field range within a target value. |
SetRange(UInt32, Byte, Byte, UInt32)
Sets a bit field range within a target value.
public static uint SetRange (uint value, byte start, byte length, uint flags);
static member SetRange : uint32 * byte * byte * uint32 -> uint32
Public Shared Function SetRange (value As UInteger, start As Byte, length As Byte, flags As UInteger) As UInteger
Parameters
- start
- Byte
The initial index of the range to extract (in [0, 31] range).
- length
- Byte
The length of the range to extract (depends on start
).
- flags
- UInt32
The input flags to insert in the target range.
Returns
The updated bit field value after setting the specified range.
Remarks
Just like ExtractRange(UInt32, Byte, Byte), this method doesn't validate the parameters and does not contain branching instructions, so it's well suited for use in tight loops as well.
Applies to
SetRange(UInt32, Byte, Byte, UInt32)
Sets a bit field range within a target value.
public static void SetRange (ref uint value, byte start, byte length, uint flags);
static member SetRange : uint32 * byte * byte * uint32 -> unit
Public Shared Sub SetRange (ByRef value As UInteger, start As Byte, length As Byte, flags As UInteger)
Parameters
- start
- Byte
The initial index of the range to extract (in [0, 31] range).
- length
- Byte
The length of the range to extract (depends on start
).
- flags
- UInt32
The input flags to insert in the target range.
Remarks
Just like ExtractRange(UInt32, Byte, Byte), this method doesn't validate the parameters and does not contain branching instructions, so it's well suited for use in tight loops as well.
Applies to
SetRange(UInt64, Byte, Byte, UInt64)
Sets a bit field range within a target value.
public static ulong SetRange (ulong value, byte start, byte length, ulong flags);
static member SetRange : uint64 * byte * byte * uint64 -> uint64
Public Shared Function SetRange (value As ULong, start As Byte, length As Byte, flags As ULong) As ULong
Parameters
- start
- Byte
The initial index of the range to extract (in [0, 63] range).
- length
- Byte
The length of the range to extract (depends on start
).
- flags
- UInt64
The input flags to insert in the target range.
Returns
The updated bit field value after setting the specified range.
Remarks
Just like ExtractRange(UInt64, Byte, Byte), this method doesn't validate the parameters and does not contain branching instructions, so it's well suited for use in tight loops as well.
Applies to
SetRange(UInt64, Byte, Byte, UInt64)
Sets a bit field range within a target value.
public static void SetRange (ref ulong value, byte start, byte length, ulong flags);
static member SetRange : uint64 * byte * byte * uint64 -> unit
Public Shared Sub SetRange (ByRef value As ULong, start As Byte, length As Byte, flags As ULong)
Parameters
- start
- Byte
The initial index of the range to extract (in [0, 63] range).
- length
- Byte
The length of the range to extract (depends on start
).
- flags
- UInt64
The input flags to insert in the target range.
Remarks
Just like ExtractRange(UInt64, Byte, Byte), this method doesn't validate the parameters and does not contain branching instructions, so it's well suited for use in tight loops as well.