I'm declaring an array like this
dim subs(,,) as object
Then in the form load procedure I redim:
redim subs(29,0,0)
(I want an array of 30 items with two extra 'properties' that I can access
at very high speed while my app is running)
How do I fill an individual row of this array?
I've tried variations on
subs(i, 0, 0) = {a, b, c}
But I can't figure it out.
Help???
Bob 3 1446
Hi Bob,
An old sample of me it uses the arraylist which is dynamic, and therefore
much faster than what you are using now. (That is created everytime new), It
are 2 dimensions, however when you understand it, it is of course easy to
add a thirth dimension.
(I changed some names because I was using in this sample y, yn and x for the
arraynames which looks a little bit unreadable to me now, so maybe some
typos)
I hope this helps?
Cor
\\\
Dim Arr1 As New ArrayList
For i As Integer = 0 To 9
Dim Arr2 As New ArrayList
For j As Integer = 0 To 4
Arr2.Add(Chr(j + 65))
Next
Arr1.Add(Arr2)
Next
MessageBox.Show(DirectCast(Arr1(2), ArrayList)(2).ToString)
Dim Arr3 As New ArrayList
For j As Integer = 0 To 4
Arr3.Add(Chr(j + 75))
Next
Arr1.Insert(1, Arr3)
MessageBox.Show(DirectCast(Arr1(1), ArrayList)(2).ToString)
/// I'm declaring an array like this
dim subs(,,) as object
Then in the form load procedure I redim:
redim subs(29,0,0)
(I want an array of 30 items with two extra 'properties' that I can access at very high speed while my app is running)
How do I fill an individual row of this array?
I've tried variations on
subs(i, 0, 0) = {a, b, c}
But I can't figure it out.
Help???
Bob
* "Bob Graham" <rv*****@pacbell.net> scripsit: dim subs(,,) as object
Then in the form load procedure I redim:
redim subs(29,0,0)
(I want an array of 30 items with two extra 'properties' that I can access at very high speed while my app is running)
How do I fill an individual row of this array?
I've tried variations on
subs(i, 0, 0) = {a, b, c}
Have a look for "jagged arrays" in documentation, maybe that's what you
are looking for.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Thank You Both
"Bob Graham" <rv*****@pacbell.net> wrote in message
news:dL*******************@newssvr25.news.prodigy. com... I'm declaring an array like this
dim subs(,,) as object
Then in the form load procedure I redim:
redim subs(29,0,0)
(I want an array of 30 items with two extra 'properties' that I can access at very high speed while my app is running)
How do I fill an individual row of this array?
I've tried variations on
subs(i, 0, 0) = {a, b, c}
But I can't figure it out.
Help???
Bob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ip4ram |
last post by:
I used to work with C and have a set of libraries which allocate
multi-dimensional arrays(2 and 3) with single malloc call.
data_type **myarray
=...
|
by: Cant Think Today |
last post by:
I have multi-dimesional arrays that can be specifed by the user, e.g
1,2,3,4,5
1,2,3,4,5,6,7,8,9,10
1,2,3,4,5,6
I think a bit of code that will iterate over these arrays to print out
the...
|
by: Robert P. |
last post by:
I can easily store a one-dimensional array in viewstate ( see Test1 )
If I try storing a multi-dimensional array in the viewstate it's crapping
out on me when it goes to serialize the array (not...
|
by: SQLScott |
last post by:
I have looked all over and I cannot find an example or information on passing
a multi-dimensional array. Well, that is not true. I found a close example
in C++ but it didn't work when I...
|
by: entitledX |
last post by:
Hi, I'm trying to use the HDF library to read a few HDF files that I
need to process. The data in each file varies in rows, but the
columns remain constant. Because of that, I had dynamically...
|
by: Balaskas Evaggelos |
last post by:
Hi,
does anyone know how i can sort a multi-dimensional array
by a specific field ?
for example i want to sort arr where n=2,
but i need the data of every array to follow that order.
...
|
by: per9000 |
last post by:
Hi all,
I have a two-dimensional array of data, f.x int's. We can imagine that
the array is "really large". Now I want the data in it and store this
in a one-dimensional array.
The obvious...
|
by: gianluca |
last post by:
Hy list,
I've to declare a 3D matrix in C . I tried with that code:
double ***mat;
mat=(double***)G_malloc(ndimension*(sizeof(double));
but the program send me a run time error.
|
by: vippstar |
last post by:
The subject might be misleading.
Regardless, is this code valid:
#include <stdio.h>
void f(double *p, size_t size) { while(size--) printf("%f\n", *p++); }
int main(void) {
double array = { {...
|
by: =?Utf-8?B?SGVucmlrIFNjaG1pZA==?= |
last post by:
Hi,
consider the attached code.
Serializing the multi-dimensional array takes about 36s
vs. 0.36s for the single-dimensional array.
Initializing the multi-dimensional array takes about 4s...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |