Collection

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi guys;

I created a class that inherits from DictionaryBase class.
The thing is that I want to allow the user when using my class to enter
duplicate keys in the collection like;

Dim myCl as new MyDictionary
myCl.Dictionary.Add("Mike", AnObject)
myCl.Dictionary.Add("Mike", AnObject2)
myCl.Dictionary.Add("Mike", AnObject3)

how can I achieve this inhering from DictionaryBase?

Thanks guys!
 
Mike,

I think that all of the .Net key-value collections require unique, non-null
keys.

Kerry Moorman
 
Kerry Moorman said:
I think that all of the .Net key-value collections require unique,
non-null
keys.

Exception: The 'NamedValueCollection' which store all values for a certain
key in a single string. However, this is not a very flexible solution.
 
maybe i am thinking to simplistic here :-)

but why don`t you just add the objects to a object array and store them
under one name in the dictionary

regards

Michel Posseth [MCP]
 
Back
Top