How about System.Collections.DictionaryBase, but then you always have to
provide a key( or generate a unique one if the optional parameter was not
specified ).

HTH,
Christoph Schittko

----- Original Message -----
From: "Axel Heitland" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 17, 2002 4:49 PM
Subject: Re: [ADVANCED-DOTNET] using system.collections in .net


Have a look at IDictionary ...

HTH
        Axel

-----Original Message-----
From: Don & Linda [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 16. August 2002 21:36
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] using system.collections in .net


I am trying to implement my own collection class for an object in VB by
inheriting from System.Collection.CollectionsBase.  However, I would
like to use a key to insert my objects into the collection.  It looks
like the add method in the collectionsbase class has only the object as
an argument.

Is there another class that I can inherit from that does what I need it
to do.

Ideally, I want to be able to do something like I used to be able to do
in vb6:

Public Sub Add(objItemToAdd As OrderDetail, _
               Optional Key As String = "", _
    mCollection.Add objItemToAdd, Key
End Sub

Thanks in advance,

Linda

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to