public static SymBit GetBit(uint aValue, int aBitNumber) { uint mask = 1u << aBitNumber; uint value = aValue & mask; SymBit ret = (value != 0) ? SymBit.ESet : SymBit.EClear; return(ret); }
public SymBit this[int aIndex] { get { SymBit ret = SymBitUtils.GetBit(AIRawValue, aIndex); return(ret); } }
public SymBit this[int aIndex] { get { if (aIndex < 0 || aIndex > iNumberOfBits) { throw new ArgumentException("Specified bit is out of bounds"); } uint mask = (1u << aIndex); SymBit ret = ((mask & iValue) == mask) ? SymBit.ESet : SymBit.EClear; return(ret); } }