Hi, for example i have a structure class and obviously created a new list as so.
My UserControl creates the new car.
The car class had 5 members. One of which is ColorCode:Private _car As New List(Of Car)
In my user control i have a function as so.Code:Public Color as string
I use a property to share information in the user control between usercontrol and main formCode:Private Function CreateCar(*removed) As Car Dim newCar As Car newCar.Price = price newCar. = Color etc........ _car.Add(newCar) lstCars.Items.Add(newCar) Return newCar End Function
Now i need main form to be able to get one of the 5 members from each added string to the list.Code:Public ReadOnly Property CarCollection As List(Of Car) Get Return _car End Get End Property
(MainForm)
I need mainform to be able to gather one part of each new generated cars structure.Code:For Each line In _order.CarCollection MessageBox.Show(_order.CollectionCollection....stuck here) Next
bit stuck.


Reply With Quote

