public static string ConvertToEn(string text)
{
    const string s1 = "。;,?!、“”‘’";
    const string s2 = @".;,?!\""""''";
    char[] c = text.ToCharArray();
    for (int i = 0; i < c.Length; i++)
    {
        int n = s1.IndexOf(c[i]);
        if (n != -1) c[i] = s2[n];
    }
    return new string(c);
}

//将txtname文本框中输入的中文符号转换成英文符号 string strname=ConvertToEn(this.txtName.Text.ToString());

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2021-12-19
  • 2022-02-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-04-06
  • 2021-11-23
相关资源
相似解决方案