String ToLower() method return a copy of the specified string converted to lowercase. this string method exists in the System namesapce. the ToLower() method return value type is System.String which is a lowercase string. this method does not modify the provided string instance, it just return a new instance of string object in which all characters are lowercase. this ToLower() method return a new string by converting all the characters to lowercase from provided string.
the ToLower() method have an overload method that is ToLower(CultureInfo). this ToLower(CultureInfo) method return a copy of the specified string converted to lowercase, using the casing rules of the specified culture.
the following .net c# example code demonstrate us how can we convert a string to lowercase characters in an console application.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | class Program { static void Main(string[] args) { string myString = "HELLO World"; string modifiedString = myString.ToLower(); Console.WriteLine("String converted successfully to lower case!"); Console.WriteLine(myString+ "=>"+modifiedString); Console.ReadLine(); } } |
1 2 3 4 | String converted successfully to lower case! HELLO World=>hello world |