摘要: public static T ByteToStructure<T>(byte[] dataBuffer) { object structure = null; int size = Marshal.SizeOf(typeof(T)); IntPtr allocIntPtr = Marshal.AllocHGlobal(size); try { Marshal.Copy(dataBuffer, 0, allocIntPtr, ... 阅读全文
posted @ 2013-03-27 11:22 ahuo 阅读(312) 评论(0) 推荐(0) 编辑