判断输入是否为汉字的方法

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 判断是否为汉字
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入:");
            IsChina(Console.ReadLine());
            Console.ReadLine();
        }
        public static  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;
                    Console.WriteLine("非汉字");
                }
                else
                {
                   BoolValue = true;
                   Console.WriteLine("汉字");
                 }
             }
        return BoolValue;
            }   
    }
}

  

原文地址:https://www.cnblogs.com/dyee/p/IsChina.html