以下是引用lyy3146在2010-8-31 16:08:08的发言:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
char c1= 'a';
char c2 = 'b';
char c3 = 'C';
char c4 = '4';
if (char.IsLower(c1) ||
char.IsLower(c2) ||
char.IsLower(c3) ||
char.IsLower(c4))
{
Console.WriteLine("A char is lowercase");
}
if (char.IsUpper(c1) ||
char.IsUpper(c2) ||
char.IsUpper(c3) ||
char.IsUpper(c4))
{
Console.WriteLine("A char is Uppun");
}
String sample = "UPPERCASE WORD";
Console.WriteLine(sample.ToLower());
Console.ReadLine();
}
}
}
你的方法怎么那样复杂
那些大小写字母是会变化的,不是固定的!