IntExtensions.GetBits

Extension Method in IntExtensions

Declaration

public static int GetBits(this int n, int amount, int offset)

Description

Returns a subset of bits from the number.

Parameters

nThe number to get bits from.
amountThe amount of bits to return.
offsetThe amount of bits to discard.

Returns

intThe subset of bits.