if i have multiple values for same key then how to add it in hash table
for example:
Hashtable hs = new Hashtable();
hs["id"]= "x001.xhtml";
hs["media-type"]= "application/xhtm+xml";
hs["href"]= "text/001.xhtml";
hs["id"]= "x002.xhtml";
hs["media-type"]= "application/xhtm+xml";
hs["href"]= "text/002.xhtml";
hs["id"]= "x003.xhtml";
hs["media-type"]= "application/xhtm+xml";
hs["href"]= "text/003.xhtml";
this is taking only last group in hashtable i.e
hs["id"]= "x003.xhtml";
hs["media-type"]= "application/xhtm+xml";
hs["href"]= "text/003.xhtml";
how to solve this….thanks in advance!!
A hashtable is defined as having unique keys, and the indexer replaces existing values. It sounds like you actually want a list of objects, i.e.
with
(or similar)