C# Program to Convert Upper case to Lower Case

This is a C# Program to convert upper case to lower case.

Problem Description

This C# Program Converts Upper Case to Lower Case.

Problem Solution

Here the String is obtained in uppercase which is converted to lowercase using tolower().

Program/Source Code

Here is source code of the C# Program to Convert Upper case to Lower Case. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.

/*
 * C# Program to Convert Upper case to Lower Case
 */
using System;
public class Program
{
    public static void Main()
    {
        string str;
        Console.WriteLine("Enter the String in Uppercase :");
        str = Console.ReadLine();
        Console.WriteLine("String in LowerCase : {0}", str.ToLower());
        Console.ReadLine();
    }
}
Program Explanation

In this C# program, we are reading the string in uppercase using ‘str’ variable. Here the string is obtained in uppercase which is converted to lowercase using tolower(). Print the lower case value of the string.

advertisement
advertisement
Runtime Test Cases
 
Enter the String in Uppercase : SANFOUNDRY
String in Lowercase :sanfoundry

Sanfoundry Global Education & Learning Series – 1000 C# Programs.

If you wish to look at all C# Programming examples, go to 1000 C# Programs.

If you find any mistake above, kindly email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.