综合

c#中文gbk编码查询示例代码

网友投稿 2023-07-04 04:31:04

复制代码 代码如下:
private void button_Inquriy_Click(object sender, EventArgs e)
{
if (textBox_Inquiry.TextLength > 0)
{
String strInquiry = textBox_Inquiry.Text;
byte[] bytes = Encoding.GetEncoding("GB2312").GetBytes(strInquiry);
String strResult = String.Empty;
foreach (byte b in bytes)
{
strResult += b.ToString("X2");
strResult += " ";
}
textBox_Result.Text = strResult;
}
else
{
MessageBox.Show("请输入待查询的字符");
}
}

相关文章

  • 港股通开户有哪些的条件(投资者怎么买卖港股通)
  • 股票红色和绿色代表什么
  • 建设银行账户管理费什么意思
  • 满五唯一什么意思
  • 举牌是什么意思
  • 房贷首付可以贷款吗?
  • Top 10 网络电话软件排行榜
  • 炒股高手领悟的人性与价值
  • 手机办公软件app排行 手机办公app排行榜前十名
  • 麒麟670怎么样 麒麟670和麒麟710哪个好