Hi!
I'm using Visual Basic 2013
In VB6 I used a Collection to hold classes.
I want to do something like this (simple example):
Car.Wheel(0).pressure=1
In VB6 I defined a Collection and added the subclasses to this and then made a property for the sub class:
Public Property Get Wheel(lIndex As Long) As clsWheeltem Set Wheel = collWheels(lIndex)
Exit Property
End Property
Public Property Let Wheel(lIndex As Long, Subclass As clsWheelItem)
Set collWheels(lIndex) = Wheel(Lindex)
End Property
In .net I cannot get this to work. It states that it's readonly in the let statement.
What can I do in Basic .net to use indexed subclasses ?
I'm using Visual Basic 2013
In VB6 I used a Collection to hold classes.
I want to do something like this (simple example):
Car.Wheel(0).pressure=1
In VB6 I defined a Collection and added the subclasses to this and then made a property for the sub class:
Public Property Get Wheel(lIndex As Long) As clsWheeltem Set Wheel = collWheels(lIndex)
Exit Property
End Property
Public Property Let Wheel(lIndex As Long, Subclass As clsWheelItem)
Set collWheels(lIndex) = Wheel(Lindex)
End Property
In .net I cannot get this to work. It states that it's readonly in the let statement.
What can I do in Basic .net to use indexed subclasses ?