C#判断字符串是否包含中文
使用正则表达式,很容易就解决了,代码如下:
public static bool CheckChinese(string strZh)
{
Regex re = new Regex(@"[\u4e00-\u9fa5]+");
if (re.IsMatch(strZh))
{
return true;
}
return false;
}