Finding spelling of an element in an ignore case dictionary
Posted
by Andrew White
on Stack Overflow
See other posts from Stack Overflow
or by Andrew White
Published on 2010-05-12T22:01:48Z
Indexed on
2010/05/12
22:04 UTC
Read the original article
Hit count: 287
c#
|dictionary
Hi,
Weird question, but I have a dictionary created with StringComparer.OrdinalIgnoreCase, looks something like this AaA, 10 aAB, 20 AAC, 12
I then use myDictionary["AAA"] to find the value associated with the key, but what I also need to know is what the actual spelling of the key is in myDictionary, e.g. in this case I want it to return AaA. Any way to do this without a loop? Thx.
© Stack Overflow or respective owner