String.ToLowerInvariant Method is used to get a copy of this String object converted to lowercase using the casing rules of the invariant culture. Here, “invariant culture” represents a culture that is culture-insensitive.
public string ToLowerInvariant ();
Return value: The return type of this method is System.String. This method returns a string which is a lowercase equivalent of the current string.
Below given are some examples to understand the implementation in a better way:
String before ToLowerInvariant: WelCome tO GeeKSfOrGeeKs String after ToLowerInvariant: welcome to geeksforgeeks
String 1: GEeks String 2: geeks String 1: geeks String 2: geeks String 1: GEEKS String 2: geeks
- The invariant culture represents a culture that is culture-insensitive. It is associated with the English language but not with a specific country or region.
- ToLowerInvariant() method does not modify the value of the current instance. Instead, it returns a new string in which all characters in the current instance are converted to lowercase.
- This method can’t be overloaded if you try to overload this method, it will gives you compile time error.
- Difference between Method Overriding and Method Hiding in C#
- C# | EndsWith() Method
- DateTime.Add() Method in C#
- C# | Uri.IsHexEncoding() Method
- Anonymous Method in C#
- C# | IndexOfAny() Method
- C# | PadRight() Method
- C# | Dictionary.Add() Method
- DateTimeOffset.Add() Method in C#
- C# | Math.Pow() Method
- Queue.Contains() Method in C#
- C# | PadLeft() Method
- C# | Clone() Method
- C# | Method Parameters
- Stack.Pop() Method in C#
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.