Convert Strings from Uppercase To Lowercase in C#

C# program to convert the strings to lowercase.

Source code :

using System;
public class Program
{
    public static void Main()
    {
        string str;
        Console.WriteLine("Enter the String :");
        str = Console.ReadLine();
        Console.WriteLine("String in LowerCase : {0}", str.ToLower());
    }
}

Output :

Enter the String :
CodeCRY
String in LowerCase : codecry

Notes :

ToLower() function converts the string to lowercase from uppercase.

Algorithm :

  1. Get the input string from the user.
  2. Convert the string using ToLower() function.
  3. Print the converted string.

Output :


                

Comments :