|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
CollectionHi 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 Show quoteHide quote "Mike" wrote: > 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! > > > "Kerry Moorman" <KerryMoor***@discussions.microsoft.com> schrieb: Exception: The 'NamedValueCollection' which store all values for a certain > I think that all of the .Net key-value collections require unique, > non-null > keys. key in a single string. However, this is not a very flexible solution. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> 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] Show quoteHide quote "Mike" <m***@hitnext.com> wrote in message news:uRn89XwEGHA.1288@TK2MSFTNGP09.phx.gbl... > 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! > >
Armin - Start sound problem revived in new thread
Use of delegate SetWindowsHookEx and VB.NET 2005 A Framework for Datadriven Forms for VB Dot Net Byte Array, Datagrid Simple Example of How to Implement SerialPort Class Paging, Filtering and Sorting Db Interaction spped issue with upgraded code from vb6 to vb.net Add a line break in label.text populating text boxes... |
|||||||||||||||||||||||