checkBitPositionIsSet static method

bool checkBitPositionIsSet(
  1. int number,
  2. int bitPosition
)

Implementation

static bool checkBitPositionIsSet(int number, int bitPosition) {
  if ((number & (1 << (bitPosition - 1))) > 0) {
    return true;
  } else {
    return false;
  }
}