R
Rob
Hi,
I want to create an arraylist of multidimension arrays. Currently I've
managed to do these via conventional means as follows:
Dim myarraylist As ArrayList = New ArrayList()
Dim array1(,) As String = {{"bill"}, {"jill"}}
Dim array2(,) As String = {{"bob"}, {"jan"}}
myarraylist.Add(array1)
myarraylist.Add(array2)
However, I'd like to avoid having to declare each array, and assign the data
straight to the arraylist. Something like the following:
Dim myarraylist As ArrayList = New ArrayList()
myarraylist.Add({{"bill"}}, "jill"}})
myarraylist.Add({{"bob"}, {"jan"}})
Obviously, this example does not work, but does anyone know if I can
actually do it this way, or do I have to declare and initialise the arrays
first?
Thanks
I want to create an arraylist of multidimension arrays. Currently I've
managed to do these via conventional means as follows:
Dim myarraylist As ArrayList = New ArrayList()
Dim array1(,) As String = {{"bill"}, {"jill"}}
Dim array2(,) As String = {{"bob"}, {"jan"}}
myarraylist.Add(array1)
myarraylist.Add(array2)
However, I'd like to avoid having to declare each array, and assign the data
straight to the arraylist. Something like the following:
Dim myarraylist As ArrayList = New ArrayList()
myarraylist.Add({{"bill"}}, "jill"}})
myarraylist.Add({{"bob"}, {"jan"}})
Obviously, this example does not work, but does anyone know if I can
actually do it this way, or do I have to declare and initialise the arrays
first?
Thanks