Exemplo n.º 1
0
        public static byte GetLowestBitValue(byte flags)
        {
            int lowestBit = ByteFlags.GetLowestBitPosition(flags);

            return(lowestBit == 0
                                        ? (byte)0
                                        : (byte)(1 << (lowestBit - 1)));
        }
Exemplo n.º 2
0
        public static byte GetHighestBitValue(byte flags)
        {
            int highestBit = ByteFlags.GetHighestBitPosition(flags);

            return(highestBit == 0
                                        ? (byte)0
                                        : (byte)(1 << (highestBit - 1)));
        }