What is string.ToLower() in C#?

The ToLower() function converts a string to lowercase.

The following figure shows a visual representation of the ToLower() function.

Figure 1: Visual representation of ToLower() function

Syntax

string_name.ToLower()

string_name is the name of the string which is to be converted to lowercase

Parameter

The ToLower() function does not require a parameter.

Return value

The ToLower() function returns a string that is converted to lowercase.

Code

class String
{
static void Main()
{
//string
System.Console.WriteLine("('EDUCATIVE').ToLower(): "+ ("EDUCATIVE").ToLower());
//string with number
System.Console.WriteLine("('EDUCATIVE09').ToLower(): "+ ("EDUCATIVE09").ToLower());
}
}

Free Resources