title: Joining 2 dictionaries in C#
body: <p>I have 2 dictionaries as follows</p>
  
  <pre><code>Dictionary&lt;string,int&gt; (values are unique as well)
  {"xyz", 123}
  {"abc", 456}
  
  Dictionary&lt;string,CustomObject&gt;
  {"xyz", instanceOfCustomObject1}
  {"abc", instanceOfCustomObject2}
  </code></pre>
  
  <p>How do I join these 2 so that I get the following:</p>
  
  <pre><code>Dictionary&lt;int,CustomObject&gt;
  {123, instanceOfCustomObject1}
  {456, instanceOfCustomObject2}
  </code></pre>
  
  <p>I tried <code>dictionary1.Join(dictionary2, x=&gt;x.Key, y=&gt;y.Key,...)</code> but 'am blocked since I don't know how to project them out into the desired form. </p>