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