Sign In Register

How can we help you today?

Start a new topic

Overload option to ignore case sensitivity for .ContainsKey("string")

[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 );

Login to post a comment