Convert string to upper case and lower case
To convert a string to upper case we use ToUpper method. Return type of this method is string.
To convert a string into lower case we use ToLowermethod. Return type of this method is string.
string str = "i like rain";
str = str.ToUpper();
Console.WriteLine(str);
str = str.ToLower();
Console.WriteLine(str);
Output
I LIKE RAIN
I like rain
Comments
Post a Comment