111,097
社区成员




public static string convertExtendedASCII(string sourceHtmlTest)
{
string result = string.Empty;
try
{
StringBuilder str = new StringBuilder();
char c;
for (int i = 0; i < sourceHtmlTest.Length; i++)
{
c = sourceHtmlTest[i];
if (Convert.ToInt32(c) > 127)
{
str.Append("&#" + Convert.ToInt32(c) + ";");
}
else
{
str.Append(c);
}
}
result = str.ToString();
}
catch (Exception exception)
{
Console.WriteLine(exception.Message);
}
return result;
}
if ("グレー" == MainChg.Rows[0].Cells[col].Value) MessageBox.Show("true");
像我这样判断,它也进不去,但是通过设置断点内容是一样的,不知道为什么[/quote]
你这句什么意思啊? 就是运行时进不去,但设断点又能进去? 还是说看上去是一样,但实际不一样啊(全半角?有特殊符号?)
我觉得显示出口口的问题也是你的字体没有那个字,你选用些日文字库试试if ("グレー" == MainChg.Rows[0].Cells[col].Value) MessageBox.Show("true");
像我这样判断,它也进不去,但是通过设置断点内容是一样的,不知道为什么