LongExtensions.GetBits

Extension Method in LongExtensions

Declaration

public static long GetBits(this long 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

longThe subset of bits.