Hi

I need example code on how to write my own Collection class with an Add method that allows me to specify a key. The following is a cut 'n paste from MSDN:


' Restricts to Widget types, items that can be added to the collection.
Public Sub Add(ByVal awidget As Widget)
' Invokes Add method of the List object to add a widget.
List.Add(aWidget)
End Sub



Now, I would like to expand this method to include another argument that represents the key so that when I add objects to my collection, I can use a statement like this:

myCollection.Add(aWidget, key)


Your help will be greatly appreciated
Thanks