关于字符串的问题!比较急 谢谢 %B2%E9%D1%AF%BD%E1%B9%FB = 查询结果 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //先要引用vb.runtime.byte[] b={'a','b','c'}; b=Encoding.GetEncoding("GB2312").GetBytes(b);String s=Microsoft.Visual.Strings.StrConv(b,Microsoft.VisualBasic.VbStrConv.SimlifiedChinese,0); byte[] hz = new bytes[8] { 0xB2,0xE9,0xD1,0xAF,0xBD,0xE1,0xB9,0xFB };string s = System.Text.Encoding.Default.GetString(hz); 需要将 %B2%E9%D1%AF%BD%E1%B9%FB 转换成 '查询结果' string source="%B2%E9%D1%AF%BD%E1%B9%FB"string result=GetResult(source);private string GetResult(s){//这里该怎么写?} 楼主太懒了……算了我写一下,为了方便我把原字符串里面第一个%去掉了 private string GetResult(string s) { string[] Test=s.Split('%'); byte[] hz=new byte[Test.Length]; for(int i=0;i<Test.Length;i++) { int tmp=Convert.ToInt32(Test[i],16); hz[i]=(byte)tmp; } string myR = System.Text.Encoding.Default.GetString(hz); return myR; } private void button6_Click(object sender, System.EventArgs e) { string source="B2%E9%D1%AF%BD%E1%B9%FB"; string result=GetResult(source); MessageBox.Show(result); } 创建窗口句柄时出现错误?紧急。。。。 很菜鸟的问题!欢迎高手指导,谢谢! 一个网页的问题 求提示操作正在进行的图片 请问aaaaa["name"]这样的数组如何生成? 请问如何将ie上面的菜单和工具栏等属性去掉,谢谢 沈阳的.NET程序员大家认识一下.学习一下好么!!!! 关于用c#操作SQL Server数据库操作的入门问题 datagridview的问题,大侠们,求你们帮帮我把 水晶报表打印的时候怎样才能不弹出打印设置的对话框?直接打印!急! 求一简单算法~ dataGrid 数据显示问题!
b=Encoding.GetEncoding("GB2312").GetBytes(b);String s=Microsoft.Visual.Strings.StrConv(b,Microsoft.VisualBasic.VbStrConv.SimlifiedChinese,0);
byte[] hz = new bytes[8] { 0xB2,0xE9,0xD1,0xAF,0xBD,0xE1,0xB9,0xFB };
string s = System.Text.Encoding.Default.GetString(hz);
//这里该怎么写?
}
{
string[] Test=s.Split('%'); byte[] hz=new byte[Test.Length]; for(int i=0;i<Test.Length;i++)
{
int tmp=Convert.ToInt32(Test[i],16);
hz[i]=(byte)tmp;
} string myR = System.Text.Encoding.Default.GetString(hz); return myR;
} private void button6_Click(object sender, System.EventArgs e)
{
string source="B2%E9%D1%AF%BD%E1%B9%FB"; string result=GetResult(source);
MessageBox.Show(result);
}