C# ToUpper() 方法用于将字符串转换为大写。它返回一个字符串。
public string ToUpper() public string ToUpper(CultureInfo)
第一种方法不带任何参数。
它返回一个字符串
using System;
public class StringExample
{
public static void Main(string[] args)
{
string s1 = "Hello C#";
string s3 = s1.ToUpper();
Console.WriteLine(s3);
}
}
输出:
HELLO C#
