It's easy to get the value of a key from a .Net 2.0 generic Dictionary:
Dictionary<int, string> greek = new Dictionary<int, string>();
greek.Add(1, "Alpha");
greek.Add(2, "Beta");
string secondGreek = greek[2]; // Beta
But is there a simple way to get the key of a value?
int[] betaKeys = greek.WhatDoIPutHere("Beta"); // expecting single 2
A dictionary doesn't keep an hash of the values, only the keys, so any search over it using a value is going to take at least linear time. Your best bet is to simply iterate over the elements in the dictionary and keep track of the matching keys or switch to a different data structure, perhaps maintain two dictionary mapping key->value and value->List_of_keys. If you do the latter you will trade storage for look up speed. It wouldn't take much to turn @Cybis example into such a data structure.
Dictionary class is not optimized for this case, but if you really wanted to do it (in C# 2.0), you can do:
I prefer the LINQ solution for elegance, but this is the 2.0 way.