- 博客(1)
- 收藏
- 关注
原创 C#将int数组转换为byte数组
在C里面很简单,直接使用指针强制转换一下就OK,C#也支持指针,直接想到用指针转。代码如下 public static unsafe byte[] IntArrToByteArr(int[] intArr) { byte[] bytArr = new byte[sizeof(int) * intArr.Length]; //使用int指针指向in
2015-04-22 18:35:52
11972
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人