The C# ToUpper function is employed to transform a string to uppercase and it outputs a new string.
Signature
Example
public string ToUpper()
public string ToUpper(CultureInfo)
Parameter
First method does not take any parameter.
Return
It returns a string
C# String ToUpper Method Example
Example
using System;
public class StringExample
{
public static void Main(string[] args)
{
string s1 = "Hello C#";
string s3 = s1.ToUpper();
Console.WriteLine(s3);
}
}
Output:
Output
HELLO C#