title: Merging dictionaries in C#
body: <p>What's the best way to merge 2 or more dictionaries (<code>Dictionary&lt;T1,T2&gt;</code>) in C#?
  (3.0 features like LINQ are fine).</p>
  
  <p>I'm thinking of a method signature along the lines of:</p>
  
  <pre><code>public static Dictionary&lt;TKey,TValue&gt;
                   Merge&lt;TKey,TValue&gt;(Dictionary&lt;TKey,TValue&gt;[] dictionaries);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>public static Dictionary&lt;TKey,TValue&gt;
                   Merge&lt;TKey,TValue&gt;(IEnumerable&lt;Dictionary&lt;TKey,TValue&gt;&gt; dictionaries);
  </code></pre>
  
  <p><strong>EDIT:</strong> Got a cool solution from JaredPar and Jon Skeet, but I was thinking of something that handles duplicate keys. In case of collision, it doesn't matter which value is saved to the dict as long as it's consistent.</p>