The [System.String](<https://msdn.microsoft.com/en-us/library/system.string(v=vs.110).aspx>)
class supports a number of methods to convert between uppercase and lowercase characters in a string.
[System.String.ToLowerInvariant](<https://msdn.microsoft.com/en-us/library/system.string.tolowerinvariant(v=vs.110).aspx>)
is used to return a String object converted to lowercase.[System.String.ToUpperInvariant](<https://msdn.microsoft.com/en-us/library/system.string.toupperinvariant(v=vs.110).aspx>)
is used to return a String object converted to uppercase.Note: The reason to use the invariant versions of these methods is to prevent producing unexpected culture-specific letters. This is explained here in detail.
Example:
string s = "My String";
s = s.ToLowerInvariant(); // "my string"
s = s.ToUpperInvariant(); // "MY STRING"
Note that you can choose to specify a specific Culture when converting to lowercase and uppercase by using the String.ToLower(CultureInfo) and String.ToUpper(CultureInfo) methods accordingly.