专注

导航

2011年12月2日 #

字节数组与值类型变量的互相转换,以及注意事项 [转]

摘要: 1: byte[] bytes = { 25, 0, 0, 1, 0, 0, 0, 1 }; 2: int numInt = BitConverter.ToInt32(bytes, 0); 3: short numShort = BitConverter.ToInt16(bytes, 0); 4: long numLong = BitConverter.ToInt64(b... 阅读全文

posted @ 2011-12-02 13:42 陈啊M 阅读(290) 评论(0) 推荐(0) 编辑