I have a simple structure for example purposes I add to an array list
public structure MyStruct
dim counter as integer
end structure
dim mylist as ArrayList
dim x as New MyStruct
x.counter = 2
mylist.Add(x)
debug.writeline (mylist(0).coun ter) shows a value of 2
I try to change the value
mylist(0).count er = 3
and I get an error:
**Latebound assignment to a field of value type 'MyStruct'is not valid when
'MyStruct' is the result of a latebound expression.
What does this mean? How can I simply change the value of that element in
the arraylist?
Thanks
BUC
public structure MyStruct
dim counter as integer
end structure
dim mylist as ArrayList
dim x as New MyStruct
x.counter = 2
mylist.Add(x)
debug.writeline (mylist(0).coun ter) shows a value of 2
I try to change the value
mylist(0).count er = 3
and I get an error:
**Latebound assignment to a field of value type 'MyStruct'is not valid when
'MyStruct' is the result of a latebound expression.
What does this mean? How can I simply change the value of that element in
the arraylist?
Thanks
BUC
Comment