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