摘要:
byte[] BytePara = 为从C++里取出的字节数组;InfoDataStruct 为结构,循环将Byte数组里的内容转换为结构InfoDataStruct* p = (InfoDataStruct*)(BytePara+ (i * 55));InfoDataStruct dataStruct= BytesToStruct<InfoDataStruct>(BytePara,(i * 55));///不使用泛型,会使得编码繁琐。 public static object BytesToStruct(byte[] bytes, int startIndex, Type str 阅读全文