C#教程
C#控制语句
C#函数
C#数组
C#面向对象
C#命名空间和异常
C#文件IO
C#集合
C#多线程
C#其它

C# String ToUpper()

C# String ToUpper()

C# ToUpper() 方法用于将字符串转换为大写。它返回一个字符串。

签名

public string ToUpper()
public string ToUpper(CultureInfo)

参数

第一个方法不带任何参数。

返回

它返回一个字符串

C# String ToUpper() 方法示例

    using System; 
            
    public class StringExample  
    {  
        public static void Main(string[] args)  
        {  
           string s1 = "Hello C#";
           string s3 = s1.ToUpper();
           Console.WriteLine(s3);
        }  
    }  
输出:
HELLO C#
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4