Given a string in any case (lower, upper, proper or mixed case) and we have to convert into Uppercase.
For Example:
1) Input String: "This is india" then it will convert into : "THIS IS INDIA".
2) Input String: "This Is India" then it will convert into : "THIS IS INDIA".
3) Input String: "this is india" then it will convert into : "THIS IS INDIA".
4) Input String: "tHIS iS iNDIA" then it will convert into : "THIS IS INDIA".
String.ToUpper()
String.ToUpper() Method returns uppercase converted string.
Syntax:
String String.ToUpper();
Consider the program:
Output