public static byte[] Struct2Bytes(object obj) { ByteArray ba = new ByteArray(); LoopObj(obj, ba); return(ba.ToBytes()); }