判断字符串里面是否包含汉字

        //判断字符串里面是否包含汉字
               public static bool CheckChineseInString( string strText)
              {
                      if( strText == null || strText.Length == 0 )
                            return false ;
                      bool flag=false ;
                      foreach( char vChar in strText)
                     {
                            if( (int )vChar >= 19968 && (int)vChar <= 40869 )
                           {
                                  flag= true;
                                   break;
                           }
                     }
                      return flag;
              }

 

posted @ 2013-08-07 12:46  沙耶  阅读(677)  评论(0编辑  收藏  举报