字符和ACSII码
byte[] Sn = new byte[8];
Array.Copy(MainBuf, 4, Sn, 0, 8);
string strSn = " ";
for (int isn = 0; isn < 8; isn++)
{
strSn += Sn[isn];
}
其中Sn[1] = 65;strSn显示出来的值也是65.怎么才能变成A;
------解决方案--------------------Encoding.Default.GetString(Sn);
------解决方案--------------------string strSn = " ";
for (int isn = 0; isn < 8; isn++)
{
strSn += ((char)Sn[isn]).ToString();
}
------解决方案--------------------strSn += ((char)Sn[isn]).tostring();
------解决方案--------------------(char)((char)Sn[1]).ToString();