日期:2014-05-18 浏览次数:21931 次
try { viewmsg.Text = System.Text.Encoding.Default.GetString(outBytes, qd, bytes); //根据发送字节数组的起点和个数,截取,再转成字符串!! } catch (Exception ex) { try { viewmsg.Text = System.Text.Encoding.Default.GetString(outBytes, qd, bytes - 1) + "?"; // "?" = 少取半个汉字显示(1字节) } //ex As Exception catch { } }