Overload option to ignore case sensitivity for .ContainsKey("string")
D
Dylan Hunt
started a topic
over 3 years ago
[Unity3D + C#]
Currently, I can do
bool hasKey =someGSData.ContainsKey("someKey");
However, if the key was named "SomeKey", it won't exist.
Usually we follow the same patterns, but sometimes we break the pattern with exceptions to match 3rd party api patterns. It's easy to forget. This is why I suggest this optional overload:
Dylan Hunt
[Unity3D + C#]
Currently, I can do
bool hasKey = someGSData.ContainsKey("someKey");
However, if the key was named "SomeKey", it won't exist.
Usually we follow the same patterns, but sometimes we break the pattern with exceptions to match 3rd party api patterns. It's easy to forget. This is why I suggest this optional overload:
bool ignoreCase = true;
bool hasKey = someGSData.ContainsKey("someKey", ignoreCase );