I have a class with an array field, like this:
Private storage() as Integer
'some logic here
How can i use this class in a For Each loop like the Collection class? Example:
Dim coll as new Collection
Dim value as Variant
For Each value in coll
'do something
Next value
I know only the decision for a collection type field:
Public Property Get NewEnum() As IUnknown
Attribute NewEnum.VB_UserMemId = -4
Set NewEnum = storage.[_NewEnum]
End Property
Can i make something similar for an array type field?
More accurate, I meant something like applying Iterator interface with a For Each loop in Java.