日期:2014-05-18  浏览次数:20701 次

数组元如何相加啊?
Byte[]是int类型的数组。可是
Byte[2] = Byte[0] + Byte[1]无法直接相加,需要什么样的转换呢?

------解决方案--------------------
Byte[2] = Convert.ToInt32(Byte[0]) + Convert.ToInt32(Byte[1]);
------解决方案--------------------
或先转化为string,再转为int
Encoding myEncoding = Encoding.GetEncoding("utf-8");
byte[] mB = new byte[]{};
string str = myEncoding.GetString(byte[] mB)
http://www.cnblogs.com/ly4cn/archive/2005/09/08/232523.html