What is string.ToUpper() in C#?
The ToUpper() function converts a string to uppercase.
The following figure shows a visual representation of the ToUpper() function.
Syntax
string_name.ToUpper()
string_nameis the name of the string which is to be converted to uppercase
Parameter
The ToUpper() function does not require a parameter.
Return value
The ToUpper() function returns a string that is converted to uppercase.
Code
class String{static void Main(){//stringSystem.Console.WriteLine("('educative').ToUpper(): "+ ("educative").ToUpper());//string with numberSystem.Console.WriteLine("('educative09').ToUpper(): "+ ("educative09").ToUpper());}}