예제 #1
0
        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);
        }
예제 #2
0
 public SymBit this[int aIndex]
 {
     get
     {
         SymBit ret = SymBitUtils.GetBit(AIRawValue, aIndex);
         return(ret);
     }
 }
예제 #3
0
        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);
            }
        }