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