Hi. I'm trying to clean up my code. One of the annoying things is that It is full of places where I initialize a large number (for example, 30) lists at once. Something like:
I was wondering if there is a "cleaner" way to do this. I tried the following:
It didn't work. The code runs, but I get an exception saying the lists are not initialized.
Any ideas?
B4X:
Dim a, b, c, d as List
a.Initialize
b.Initialize
c.Initialize
d.Initialize
B4X:
For Each x As List in Array(a, b, c, d)
x.Initialize
Next
Any ideas?