Skip to content

Int32Extensions.GetBits Method

Definition

Gets a range of bits from an int, shifted down to the least significant position.

public static int GetBits(this int value, int startInclusive, int endInclusive);

View source

Parameters

Name Type Description
value Int32
startInclusive Int32 The zero-based start bit index, inclusive.
endInclusive Int32 The zero-based end bit index, inclusive.

Returns

Int32

The extracted bits, shifted right so the start bit is at position 0.