Author: mintajalepi | Posted on: 7/10/2008 2:21:02 AM | Views : 1058

Hi,

I have a question related to Collections and objects (classes) contained within them. What I am trying to do is

- Create a Class that has a collection of objects as well as its methods.

- The objects within the collection also have their own methods

- In my windows form I then want to use the Collection to display details in grids, tables, lists etc etc and allow the user to perform operations (add, edit, delete etc)

I have it basically working but my question is how do I call the methods in the objects contained in the collection (e.g. MyCollectionObject(iIndex).saveDetails())..?

Here are my skeleton classes and VB Windows Forms code. It is particularly the Windows Forms code I am having trouble with:

 Class Vehicle
Private iVehicleID As Integer
Private sRegistrationNo As String
Private ...

Go to the complete details ...