G
Guest
How to I populate and reference multi-dimensional ArrayList.
I would like to populate an Array list with the Add method something like so:
ArrayList a = new ArrayList;
ArrayList b = new ArrayList;
a.Add = "A";
a.Add = "B";
a.Add = "C";
b.Add = a;
a.Clear();
a.Add = "x";
a.Add = 'y';
b.Add = b;
Then turn around and go through it with two for loops and print out each
string from ArrayList A, for the two different ArrayList elements with a
MessageBox. Would someone know how to do this?
I would like to populate an Array list with the Add method something like so:
ArrayList a = new ArrayList;
ArrayList b = new ArrayList;
a.Add = "A";
a.Add = "B";
a.Add = "C";
b.Add = a;
a.Clear();
a.Add = "x";
a.Add = 'y';
b.Add = b;
Then turn around and go through it with two for loops and print out each
string from ArrayList A, for the two different ArrayList elements with a
MessageBox. Would someone know how to do this?