Hello,

I'm getting started in OOP with VB.NET and I have a question. I understand the creation and implementation of classes, etc. but let's assume I have a Customers class, with the usual properties: first name, last name, address, etc.

I also want to be able to use the Customers class to access a collection of the orders this customer has placed.

Now, I have an Orders class in place also. Order date, billing address, etc.

Below this, I want to be able to access a list of the individual items purchased for this order (which is the OrderItems class).

So, if I'm in Visual Studio, I want to be able to call up a customer class and do this sort of thing.

Dim oCustomer As Customer = New Customer(CustID)

For Each Order In oCustomer.Orders
'Do Something
Next

Response.Write(oCustomer.Orders(0).CardType)

For Each OrderItem in oCustomer.Orders(0).OrderItems
'Do something
Next

How do I accomplish this? Links to existing articles or an explanation would help!

Thanks,

Scott