title: Argument Exception "Item with Same Key has already been added"
body: <p>I keep getting an error with the following code:</p>
  
  <pre><code>Dictionary&lt;string, string&gt; rct3Features = new Dictionary&lt;string, string&gt;();
  Dictionary&lt;string, string&gt; rct4Features = new Dictionary&lt;string, string&gt;();
  
  foreach (string line in rct3Lines) 
  {
      string[] items = line.Split(new String[] { " " }, 2, StringSplitOptions.None);
  
      rct3Features.Add(items[0], items[1]);
  
      ////To print out the dictionary (to see if it works)
      //foreach (KeyValuePair&lt;string, string&gt; item in rct3Features)
      //{
      //    Console.WriteLine(item.Key + " " + item.Value);
      //}
  
  }
  </code></pre>
  
  <p>The error throws an <code>ArgumentException</code> saying, </p>
  
  <blockquote>
    <p>"An item with the same key has already been added."</p>
  </blockquote>
  
  <p>I am unsure after several Google searches how to fix this.</p>
  
  <p>Later in the code I need to access the dictionary for a compare function:</p>
  
  <pre><code>Compare4To3(rct4Features, rct3Features);
  
  public static void Compare4To3(Dictionary&lt;string, string&gt; dictionaryOne, Dictionary&lt;string, string&gt; dictionaryTwo)
  {
      //foreach (string item in dictionaryOne)
      //{
  
      //To print out the dictionary (to see if it works)
      foreach (KeyValuePair&lt;string, string&gt; item in dictionaryOne)
      {
          Console.WriteLine(item.Key + " " + item.Value);
      }
  
          //if (dictionaryTwo.ContainsKey(dictionaryOne.Keys)
          //{
          //    Console.Write("True");
          //}
          //else
          //{
          //    Console.Write("False");
          //}
      //}
  }
  </code></pre>
  
  <p>This function isn't completed, but I am trying to resolve this exception.  What are the ways I can fix this exception error, and keep access to the dictionary for use with this function?  Thank you</p>