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 2 1867
"Rob" <r_******@ozemail.com.auschrieb
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?
myarraylist.Add(New String(,) {{"bill"}, {"jill"}})
Armin
Thanks for that. I thought I had tried that, but I must have got something
wrong at the time.
"Armin Zingler" <az*******@freenet.dewrote in message
news:OW**************@TK2MSFTNGP03.phx.gbl...
"Rob" <r_******@ozemail.com.auschrieb
>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?
myarraylist.Add(New String(,) {{"bill"}, {"jill"}})
Armin
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Golf Nut |
last post by:
I am finding that altering and affecting values in elements in
multidimensional arrays is a huge pain in the ass. I cannot seem to find a
consistent way to assign values to arrays. Foreach would...
|
by: Wihlelm Bierbaum |
last post by:
I'm trying to make use of a certain method of a COM object that takes a
multidimensional array as its sole parameter.
Here's an example of the construction of said array:
$cA = array();
$cA =...
|
by: TLOlczyk |
last post by:
I have a brain cramp and I need some help.
I have a chunk of code below which demonstrates
a problem I have with multidimensional arrays.
I want to keep it simple but something specific is...
|
by: Terry |
last post by:
Hi,
can someone plz tell me how multidimensional arrays (like a 2-D array)
are stored in memory? Are they like single dimensional arrays? Stored
sequentially in one "row", so to say?
Thanks
...
|
by: Charles Banas |
last post by:
i've got an interesting peice of code i'm maintaining, and i'd like to
get some opinions and comments on it, hopefully so i can gain some
sort of insight as to why this works.
at the top of the...
|
by: Claire |
last post by:
I have a multidimensional array defined as
private double myArray = new double;
The first column of the array contains X values, the other contains Y values
I have a charting function defined as...
|
by: d[ - - ]b |
last post by:
Hi there,
Just wondering, if there is any way to have a dynamic / unspecified size of
an array? It obviously needs to be updated, deleted etc. The only way I
thought is by making the array...
|
by: |
last post by:
I'm fairly new to ASP and must admit its proving a lot more unnecessarily
complicated than the other languages I know. I feel this is because there
aren't many good official resources out there to...
|
by: filippo nanni |
last post by:
Hello everybody, my question is this:
I have two multidimensional arrays and I have to create a third one (for later use) from comparing these two. Here is my example code:
//BEGIN CODE
var...
|
by: Slain |
last post by:
I need to convert a an array to a multidimensional one. Since I need
to wrok with existing code, I need to modify a declaration which looks
like this
In the .h file
int *x;
in a initialize...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |