使用BitConverter对int与byte[]类型进行互相转换
int转换到byte[]
int iCount = 45;
byte[] byInputData =  BitConverter.GetBytes(iCount);
byte[]转换回int
int iCount = BitConverter.ToInt32(byInputData, 0);

posted on 2007-04-10 15:19  凯恩  阅读(2287)  评论(0编辑  收藏  举报