title: Bidirectional 1 to 1 Dictionary in C#
body: <p>I am looking for a generic, bidirectional 1 to 1 Dictionary class in C# (2), ie. a <code>BiDictionaryOneToOne&lt;T, S&gt;</code> which is guaranteed to only contain one of each value and key (up to RefEquals anyway), and which can be searched using either key or value. Anyone know of one, or should I just implement it myself? I can't believe that I'm the first person to need this...</p>
  
  <p>There is a BiDictionary in the answers to <a href="https://stackoverflow.com/questions/255341/getting-key-of-value-of-a-generic-dictionary">this question</a>, but it is not for unique elements (and also does not implement RemoveByFirst(T t) or RemoveBySecond(S s)). </p>
  
  <p>Thanks!</p>