A
Ale K.
Hi, i need some help with the following thing....
i got two classes , PersonData, and PersonDataCollection that inherits from
DictionaryBase for been able to store PersonData Items, the thing is that i
want to be able to implement FOR....EACH with this classes.
How can i do this??
Thanks.
Alex.
(Quick And Dirty Example of what i want)
.....On A Form....
Dim PersonCollection as New PersonDataCollection
Public Sub ListPersons()
Dim dp as PersonData
FillCollection()' Imaginary Function Filling PersonCollection Object
For each dp on PersonCollection
messagebox.show(dp.name)
next
End Sub
Public Class PersonData
Public Name as String
End Class
Public Class PersonDataCollection
Inherits DictionaryBase
ReadOnly Property Item(ByVal Id As Long) As PersonData
Get
Return CType(dictionary.Item(Id.ToString), PersonData)
End Get
End Property
End Class
i got two classes , PersonData, and PersonDataCollection that inherits from
DictionaryBase for been able to store PersonData Items, the thing is that i
want to be able to implement FOR....EACH with this classes.
How can i do this??
Thanks.
Alex.
(Quick And Dirty Example of what i want)
.....On A Form....
Dim PersonCollection as New PersonDataCollection
Public Sub ListPersons()
Dim dp as PersonData
FillCollection()' Imaginary Function Filling PersonCollection Object
For each dp on PersonCollection
messagebox.show(dp.name)
next
End Sub
Public Class PersonData
Public Name as String
End Class
Public Class PersonDataCollection
Inherits DictionaryBase
ReadOnly Property Item(ByVal Id As Long) As PersonData
Get
Return CType(dictionary.Item(Id.ToString), PersonData)
End Get
End Property
End Class