title: How to add Duplicate Entries to Hashtable in C#
body: <p>I am having a xml ...there are some duplicate entries in that how to add those in Hashtable</p>
  
  <pre><code>        &lt;hashdata&gt;
          &lt;data key="A" value="A1"/&gt;
          &lt;data key="B" value="B1"/&gt;
          &lt;data key="C" value="C1"/&gt;
          &lt;data key="D" value="D1"/&gt;
          &lt;data key="E" value="E1"/&gt;
          &lt;data key="F" value="F1"/&gt;
          &lt;data key="A" value="A2"/&gt;
          &lt;data key="D" value="D2"/&gt;
          &lt;data key="F" value="F2"/&gt;
          &lt;/hashdata&gt;
  
  
          XmlDocument xmldoc = new XmlDocument();
          xmldoc.Load(@"test.xml");
          XmlNodeList xnode = xmldoc.SelectNodes("/hashdata/data");
          Hashtable hst = new Hashtable();
          for (int iCount = 0; iCount &lt; xnode.Count; iCount++)
          {
              hst[xnode[iCount].Attributes["key"].Value.ToString()] = xnode[iCount].Attributes["value"].Value.ToString();
          }
  </code></pre>
  
  <p>How to solve this </p>