I'm given to understand that in VB6 user-defined classes cannot have constructors specified. So given a Collection object named entities dimensioned in the main codeblock and a user-defined class named Entity:
Public Class Entry
'local variable(s) to hold property value(s)
Private mvarcurrNameValue As String 'local copy
Private mvarnewwNameValue As String 'local copy
Public Property Let newwNameValue(ByVal vData As String)
mvarnewwNameValue = vData
End Property
Public Property Get newwNameValue() As String
newwNameValue = mvarnewwNameValue
End Property
Public Property Let currNameValue(ByVal vData As String)
mvarcurrNameValue = vData
End Property
Public Property Get currNameValue() As String
currNameValue = mvarcurrNameValue
End Property
End Class
how do I achieve the following C++/VB.NET idiom in the VB6 realm?
For Each foo In bar
entities.Add (new Entity("Sinatra","Frank")) 'VB.NET seems to like this but not VB6
Next
I don't know in advance how many Entity instances there will be.
TIA,
Still-learning Steve