G
Guest
I would like to create an unknown number of ArrayLists, that is I don't know
that until runtime.
Of course I can do this if I knew I needed two:
ArrayList IntervalArray1 = new ArrayList();
ArrayList IntervalArray2 = new ArrayList();
but what if I don't know how many I need at build time?
Although the code below doesn't work, it expresses sorta what I would like
to do
for (int j = 0; j < onereader.FieldCount; j++)
{
ArrayList IntervalArray[j] = new ArrayList();
}
Any ideas? Some code to do it would be nice.
Thx
that until runtime.
Of course I can do this if I knew I needed two:
ArrayList IntervalArray1 = new ArrayList();
ArrayList IntervalArray2 = new ArrayList();
but what if I don't know how many I need at build time?
Although the code below doesn't work, it expresses sorta what I would like
to do
for (int j = 0; j < onereader.FieldCount; j++)
{
ArrayList IntervalArray[j] = new ArrayList();
}
Any ideas? Some code to do it would be nice.
Thx