日期:2014-05-17 浏览次数:20473 次
StringBuilder sBuilder = new StringBuilder(128);
t=PetroChinaHIS10_120520.Performance.PSDNMobile.BriSDKLib.QNV_Tool(PetroChinaHIS10_120520.Performance.PSDNMobile.BriSDKLib.QNV_TOOL_LOCATION,0, "02885882019", "0", sBuilder, 128);
如果用下面的方法得到是乱码,
string[] a = new string[3];
a = Regex.Split(sBuilder.ToString(), "(?<=\\G.{2})(?!$)").Select(x => x.Replace("\r\n", "")).ToArray();
string a1 = a[0];
string a2 = a[1];
string a3 = a[2];
问了一下厂家,他说的是:网上搜索一下 stringbuilder 怎么按 ascii格式输出 但我不会,那位高手帮忙一下。
string str=sBuilder.ToString();
str = string.Join("",str.Select(a=>(int)a));