public static void Write(byte *bData, Direction val, ref int pos) { (*(Direction *)&bData[pos]) = val; pos += sizeof(Direction); }
public static void Read(byte *bData, out Direction val, ref int pos) { val = *(Direction *)&bData[pos]; pos += sizeof(Direction); }