只能为中文输入
/// <summary>
/// 判断字符串是否全为中文
/// </summary>
/// <param name="words"></param>
/// <returns></returns>
public static bool WordsIScn(string s)
{
for (int i = 0; i < s.Length; i++)
{
Regex rx = new Regex("^[\u4e00-\u9fa5]$");
if (!rx.IsMatch(s[i].ToString()))
{
return false;
}
}
return true;
}