byte[] bytes = new byte[3];
bytes[0] = 77;
bytes[1] = 84;
bytes[2] = 0x00;
string str = System.Text.Encoding.ASCII.GetString(bytes).Trim();
string str1 = str.Replace("\0", "") + "1234566";
MessageBox.Show(str1);
bytes[0] = 77;
bytes[1] = 84;
bytes[2] = 0x00;
string str = System.Text.Encoding.ASCII.GetString(bytes).Trim();
string str1 = str.Replace("\0", "") + "1234566";
MessageBox.Show(str1);
解决方案 »
- C#中的数组能像C中那样偏移吗?
- lbl.Width 属性怎么根据 lbl.Text内容来变化长度
- 关于图片上传的问题
- 这个正则表达式为什么没能匹配上?(在线苦等)
- (急)请问高手 .net ajax的问题
- 求一正则表达式
- .Net通用WebService调用方法?
- 奇怪的线程读取问题?
- 我想学习用C++写一个.dll的,然后通过asp.net调用这个dll,这样行吗?
- 不安装Oracle客户端,C#可以连接Oracle吗
- 着急,帮忙
- 学习remoting时 《web service--Remoting》chapter6出错:其他信息: 由于安全限制,无法访问类型 System.Runtime.Remoting.ObjRef。
Ascii的結束符號就是\0
但是我在程序单步跟踪时显示str1值为"MT\01234566"不解