I've found plenty of info on the web about making dictionaries able to do case insensitive look-ups such that if I added a key/value pair of ("A", "value") calling
MyDict["a"] == MyDict["A"]
will return true.
What I want to know is why I get a "key has already been added" error when I do
MyDict.Add("A", "value1");
MyDict.Add("a", "value2");
if I defined my dictionary to do case sensitive look-ups. Is there no way to define a Dictionary to be able to add different cased keys?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…