how to implement key/value collection that accepts duplicate keys

basically i want a collection object that i can dynamically increase size of which will allow duplicate keys. any ideas if this is possible.



0
Wee
4/1/2005 2:30:04 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

3 Replies
395 Views

Similar Articles

[PageSpeed] 53

DataTable Big Smile [:D] You can also insert your own custom objects to it. Though in such case the key field wouldn't be a primary key but basically it would be possible.
Thanks,

Teemu Keiski
Finland, EU
0
joteke
4/1/2005 2:51:23 PM
Allowing duplicate keys violates the concept of a key/value collection.  Have you considered the NameValueCollection class that while not allowing duplicate keys does allow multiple values under the same key?  When you reference the Item property for a particular key, the a comma separated string of values for that key is returned.
Bill, WESNet Designs
0
imagemaker
4/1/2005 4:28:22 PM

I don't know but can you also use HashTable for this purpose.

 


HighOnCoding
Wanna get high!
0
azamsharp
4/1/2005 5:15:59 PM
Reply: