@[C#中TO Upper() 用法]
C#中Toupper()方法是静态方法还是实例方法?
为什么在字符串调用的时候可以用变量名调用,但字符调用的时候却是char.Toupper(变量名)?
static void Main(string[] args)
{
string Str = “Study hard and get up everyday !”;
Console.WriteLine(“大写输出”+Str.ToUpper());
Console.WriteLine(“小写输出:” + Str.ToLower());
char Ch1 = ‘a’;
Console.WriteLine(“字符输出:” + char.ToUpper(Ch1));
}