string input = "HELLO WORLD"; string lowerCase = input.ToLower(); Console.WriteLine(lowerCase); // output: hello world
string input = "ÄPFEL UND BIRNEN"; CultureInfo culture = new CultureInfo("de-DE"); string lowerCase = input.ToLower(culture); Console.WriteLine(lowerCase); // output: äpfel und birnenIn both examples, the ToLower method takes a string as input and returns a new string with all characters converted to lowercase. The first example uses the default culture, which is based on the system locale. The second example takes a specific culture as an argument, in this case, the culture for German language (Germany). The System.Globalization namespace is part of the .NET Framework Class Library.