Skip to content

Int32Extensions.GetBits Method ​

Definition ​

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

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

View source

Parameters ​

NameTypeDescription
valueInt32
startInclusiveInt32The zero-based start bit index, inclusive.
endInclusiveInt32The zero-based end bit index, inclusive.

Returns ​

Int32

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