So you are looking to make an array of arrays?
- Dim MyArr As New System.Collections.ArrayList
-
Dim ChildArr as New System.Collections.ArrayList
-
MyArr.Add(ChildArr)
Shouldn't that work?
Yes I got you now, I did understand your code snippet. To clarify your description I'll write:-
Dim MyArr As New System.Collections.ArrayList
Dim ChildArr as New System.Collections.ArrayList
MyArr.Add(ChildArr) 'This will add the array "ChildArr" to the first row of "MyArr". Therfore if ChildArr contains the following items: C1,C2,C3 then "MyArr" will contain C1,C2,C3 in its first row.
Now if you want to add another items to the second row of "MyArr", then you should define another array for say "ChildArr2" and add it to "MyArr" by writing: -
Dim ChildArr2 as New System.Collections.ArrayList
ChildArr2.Add("CA1")
ChildArr2.Add("CA2")
ChildArr2.Add("CA3")
MyArr.Add(ChildArr2) ' This will add the array of "ChildArr2" into the second row in "MyArr", so if "ChildArr2" contains the following items: CA1, CA2, CA3 then "MyArr" will contain CA1, CA2, CA3 in its second row.
This means that you will get a two dimensional dynamic array of type object called "MyArr" that has two rows and three columns with the data of : -
C1, C2, C3
CA1, CA2, CA3
Therefore for each row you should define a new dynamic array to be added to that row ----- etc.
This is what you mean, isn't it?
Note: For the guy asking about my .net version, I'm using 2003
Thank you Mr. TRScheel for your help.
Kind regards,
Yahya