If I want to have a case-insensitive string-keyed dictionary, which version of StringComparer should I use given these constraints:
- The keys in the dictionary come from either C# code or config files written in english locale only (either US, or UK)
- The software is internationalized and will run in different locales
I normally use StringComparer.InvariantCultureIgnoreCase but wasn't sure if that is the correct case. Here is example code:
Dictionary< string, object> stuff = new Dictionary< string, object>(StringComparer.InvariantCultureIgnoreCase);