您的位置:首页 > 其它

使用BitConverter对int与byte[]类型进行互相转换

2007-04-10 15:19 381 查看
使用BitConverter对int与byte[]类型进行互相转换
int转换到byte[]

int iCount = 45;
byte[] byInputData = BitConverter.GetBytes(iCount);

byte[]转换回int

int iCount = BitConverter.ToInt32(byInputData, 0);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: