I do not believe that there is a class in the structure that does this directly.
Also, given the elegant answer to this question, would it be wise to create a class to represent this reversible dictionary, when could I just use LINQ to convert any dictionary into its equivalent value?
The answer to both of your questions really depends on how you are going to access your data. If you need fast, constant access time based on key and value, you will most likely want to create your own collection.
This can be done very, very easily. Just wrap two instances of Dictionary inside your class, and when you add a new element, add both - one with the key / value and one with the value / key. Your search routines can simply be pulled out of the appropriate collection, and it will stay next to O (1) for access time.
If, however, the memory is more worried, you can simply use one collection and use LINQ to analyze it. This will make your "reverse" search pretty slow, since you will need to reanalyze it every time.
source share