title: c# if key exist in dictionary still add the value in dictionary
body: <p>From a datatable I am fetching the value and putting in a <code>Dictionary&lt;string,string&gt;</code>:</p>
  
  <pre><code>Dictionary&lt;string, string&gt; mydic= new Dictionary&lt;string, string&gt;();
  </code></pre>
  
  <p>my datatable for ex is</p>
  
  <pre><code>Value     RowOrder    
  page1       01 
  page2       00
  page3       00
  </code></pre>
  
  <p>I am using LINQ to fetch the <code>RowOrder</code> according to value given and putting into <code>mydic</code>:</p>
  
  <pre><code>string id = (from DataRow dr in table3.Rows where (string)dr["Value"] == formula
               select (string)dr["RowOrder"]).FirstOrDefault();
  mydic.Add(id,Value); 
  </code></pre>
  
  <p>If I run this, error is showing:</p>
  
  <blockquote>
    <p>"An item with the same key has already been added."  </p>
  </blockquote>
  
  <p>How to overcome this. I want <code>page1</code>, <code>page2</code>, <code>page3</code> should be added with values <code>01</code>, <code>00</code>, <code>00</code> respectively</p>