首页 > 代码库 > 大写字符转换为小写字符

大写字符转换为小写字符

static void Main(string[] args)
        {
            char ch, c;
            Console.WriteLine("请输入一个字符;");
            ch = char.Parse(Console .ReadLine ());
            if ((ch >= ‘A‘) && (ch <= ‘Z‘))
                c = (char)(ch + 32);
            else
                c = ch;
            Console.WriteLine("转化后的字符是:{0}",c);
            Console.Read();
            Console.ReadLine();
        }