Joining a Dictionary to a Datatable
<p>I have a dictionary (see below) that has Key strings and Value strings and I want to be able to join this dictionary to my datatable using the dictionary Key (The equivilant unique field in the Datatable is called Network_ID).  How can I do this?  I'm hoping for a new datatable that has the original datatable information as well as two additional columns of data (key and value from the dictionary).  Thanks very much.</p>

<p>My dictionary is of this type: <code>Dictionary&lt;string, string&gt; input = new Dictionary&lt;string, string&gt;();</code></p>

<p>Edited:</p>

<pre><code>         dt.Columns.Add("Key");
         dt.Columns.Add("KeyValue");

        foreach (System.Data.DataRow row in dt.Rows)
        {
            var networkID = (string)row["Network_ID"];

            if(input.ContainsKey(networkID))
            {
                row["Key"] = networkID.ToString();
                row["KeyValue"] = input.Values.ToString();
            }

        }
</code></pre>
