What are ToLowerInvariant and related methods for? You want to read a basic discussion about the method and ToUpperInvariant. Words like Invariant are confusing, as is MSDN.
When programming recently, I encountered ToLowerInvariant and needed to look up information on it. Also, I wanted to know if it was more efficient than the regular ToLower. What's the point of these methods?
What Microsoft says. MSDN states that ToLowerInvariant and ToUpperInvariant are useful only for operating system "identifiers" and only affect behavior with specific locales, such as Turkish.
| Method link |
| String.ToLowerInvariant Method - MSDN |
| String.ToUpperInvariant Method - MSDN |
| Char.ToLowerInvariant Method - MSDN |
Absolutely nothing. The usefulness of these methods is very narrow and they are basically irrelevant to many developers. The documents indicate that these methods will only change behavior with Turkish cultures. Also, on Windows systems, the file system is case-insensitive, which further limits its use.
These 'invariant' methods are completely irrelevant to my work as a developer. They have an extremely narrow use with Turkish localizations when you need to uppercase or lowercase a file name.
Not only this, but Windows file systems file handling are case-insensitive, making these methods unlikely to be useful even on a Turkish-localized PC.