我的服务器段接受了“40 30 31 52 44 “这是一个ascII的格式我怎末能把它转化为字符?
例如:“40 30 31 52 44 “变为“@ 0 1 R D“
谢谢了!
例如:“40 30 31 52 44 “变为“@ 0 1 R D“
谢谢了!
解决方案 »
- 水晶报表根据字段取值的不同做为过滤,显示多张报表
- winform运行时添加控件
- 正则表达式
- SqlConnection问题
- 哥哥们,马上给分,有没有办法点中DataGridView就是进入了cell?
- TextBox回车后,能否禁止回发至服务器
- 请教一个强类型Dataset的问题!
- sql树结构表获取某一个节点下的所有叶子节点(没有子节点)并统计其个数 存储过程实现
- 救我!!!!硬盘找不到!
- 关于dataAdapter与Table之间的对应关系!!
- 请教高手——过程 'CountForeignCard' 需要参数 '@dReturnValue',但未提供该参数。 请赐教,焦急万分。
- 哪里有C#视频教程下载,BT上的种子,下到一大半,好几天都没有动静了。怎么办?求助。
char ch = ''a''; short ii = 65;
this.textBox1.Text = "";
this.textBox1.AppendText("The ASCII code of \''" + ch + "\'' is: " + (short) ch + "\n");
this.textBox1.AppendText("ASCII is " + ii.ToString() + ", the char is: " + (char) ii + "\n");
char cn = ''中''; short uc = 22478;
this.textBox1.AppendText("The Unicode of \''" + cn + "\'' is: " + (short) cn + "\n");
this.textBox1.AppendText("Unicode is " + uc.ToString() + ", the char is: " + (char) uc + "\n");
}
它的运行结果是 The ASCII code of ''a'' is: 97
ASCII is 65, the char is: A
The Unicode of ''中'' is: 20013
Unicode is 22478, the char is: 城
string[] a=str.Split(' ');
string b="";
for(int i=0;i<a.Length;i++)
{
b+=" "+((char)(Convert.ToInt32(a[i]))).ToString();
}
Response.Write(b);
{
string retStr = "";
byte temp = 0;
for(int i=0;i<sourceStr.Length / 2;i++)
{
temp = Convert.ToByte(sourceStr.Substring (2*i,2),16);
retStr += System.Text.Encoding.ASCII.GetString (new byte[]{temp})+" ";
}
return retStr;
}
int i=65;
char c=(char)i;
那么c就变成A了