title: LINQ: Getting Keys for a given list of Values from Dictionary and vice versa
body: <p>I have the following structure in my code <code>Dictionary&lt;TKeys, TValues&gt; data;</code>.
  I run some LINQ queries on both data types and often need to switch between <code>Keys</code> and <code>Values</code>.
  What is the best way to get the list of Keys for given Values and vice versa?
  Please, notice, that I usually have 'IEnumerable' and 'IEnumerable' as a result of my previous LINQ queries and would like to have something like <code>IEnumerable&lt;TKeys&gt; Dictionary.GetAllKeys(IEnumerable&lt;IValues&gt; vals)</code> and <code>IEnumerable&lt;TValues&gt; Dictionary.GetAllValues(IEnumerable&lt;IKeys&gt; keys)</code>.</p>
  
  <p>Maybe I need other data container for this task?</p>
  
  <p>Regards,
  Alexander.</p>