EN
C# / .NET - convert string to lowercase
0 points
In this article, we would like to show you how to convert string to lowercase in C#.
Quick solution:
xxxxxxxxxx
1
string text = "ABCD";
2
3
string textLower = text.ToLower();
4
5
Console.WriteLine(textLower); // abcd
In this example, we use toLower()
method to convert the text
string to lowercase.
xxxxxxxxxx
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
string text = "ABCD";
8
9
string textLower = text.ToLower();
10
11
Console.WriteLine(textLower); // abcd
12
}
13
}
Output:
xxxxxxxxxx
1
abcd