The ToUpper() Method is used to convert all the characters/letters of the String in upper case.
public class MyApplication
{
public static void Main(string[] args)
{
var x = "HeLLo";
var y = x.ToUpper();
System.Console.WriteLine("The String in upper case is : "+y);
}
}
In the above code, we have declared a String HeLLo, in which the letters e and o are in lower case.
var x = "HeLLo";
-Method1.png)
So, we have used the ToUpper() Method to convert them to upper case and assign to a variable y.
var y = x.ToUpper();
-Method2.png)