判断字符或字符串里是否有汉字

 

public bool IsChina(string CString)

         {

              bool BoolValue=false;

              for (int i =0 ;i<CString.Length ; i++)

              {

                   if (Convert.ToInt32(Convert.ToChar(CString.Substring(i,1)))<Convert.ToInt32(Convert.ToChar(128)))

                   {

                       BoolValue = false;

                   }

                   else

                   {

                       BoolValue = true;

                   }

              }

              return BoolValue;

         }

原文地址:https://www.cnblogs.com/sxlfybb/p/175658.html