Reader Level:
Articles

Uppercase and Lowercase Strings in C#

By Mahesh Chand on August 21, 2010
This code snippet shows how to make a string uppercase and lowercase using String class methods.
  • 0
  • 0
  • 52358

Uppercase and Lowercase

The ToUpper and ToLower methods convert a string in uppercase and lowercase respectively. These methods are easy to use. The following code shows how to use ToUppler and ToLower methods.

string aStr = "adgas";
string bStr = "ABNMDWER";
string strRes = aStr.ToUpper();
Console.WriteLine("Uppercase:"+ strRes.ToString());
strRes = bStr.ToLower();
Console.WriteLine("Lowercase:"+ strRes.ToString());


Read C# Strings  to learn more about strings in C#.

Mahesh Chand

Mahesh Chand is founder of C# Corner. C# Corner founded in 1999 is a FREE member contributions based open platform for developers to solve problems, learn new technology and hang out.  Mahesh has been awar... Read more

COMMENT USING

Trending up