Come posso ottenere una chiave del dizionario in base al valore in C #?
Dictionary<string, string> types = new Dictionary<string, string>()
{
{"1", "one"},
{"2", "two"},
{"3", "three"}
};
Voglio qualcosa del genere:
getByValueKey(string value);
getByValueKey("one")deve essere di ritorno "1".
Qual è il modo migliore per farlo? Forse HashTable, SortedLists?