UnionHelper.cs 268 B

123456789101112
  1. namespace UniversalNetFrame451;
  2. public class UnionHelper
  3. {
  4. public static void GetByteUnion(byte input, out bool[] bits)
  5. {
  6. bits = new bool[8];
  7. for (int i = 0; i < 8; i++)
  8. bits[i] = Convert.ToBoolean((input >> i) & 0b01);
  9. }
  10. }