摘要:
public static TestStruct FromFileStream(FileStream fs) { //Create Buffer byte[] buff = new byte[Marshal.SizeOf(typeof(TestStruct))]; int amt = 0; //Loop until we've read enough bytes (usually once) while(amt < buff.Length) amt += fs.Read(buff, amt, buff.Length-amt); ... 阅读全文
posted @ 2011-11-01 01:05 freewzx2005 阅读(576) 评论(0) 推荐(0) 编辑