Hi There,
I wonder if somebody could please point me in the right direction - I have been out of the VB .NET arena for some time and I am having a bit of trouble with creating arrays on the fly.
The basic task that I need to perform is that I need to dynamically create a number of arrays, based upon a value that is retrieved from a datbase lookup.
Thus if I retrieve a value of 5 back from the database lookup, I need to create 5 arrays, named x1 to x5.
My basic pseudo code at the moment is :-
' clscrew.number_of_crews is primed via a db lookup
for i = 1 to clscrew.number_of_crews
x? = System.Array.CreateInstance(GetType(integer),20))
next
My main problem is in trying to create the name of the array (which is why I have used the ? in the above example)i.e. x1,x2,x3,x4,x5 variable that will be assigned to the createinstance of the array.
Many thanks for you help.
Andrew
I wonder if somebody could please point me in the right direction - I have been out of the VB .NET arena for some time and I am having a bit of trouble with creating arrays on the fly.
The basic task that I need to perform is that I need to dynamically create a number of arrays, based upon a value that is retrieved from a datbase lookup.
Thus if I retrieve a value of 5 back from the database lookup, I need to create 5 arrays, named x1 to x5.
My basic pseudo code at the moment is :-
' clscrew.number_of_crews is primed via a db lookup
for i = 1 to clscrew.number_of_crews
x? = System.Array.CreateInstance(GetType(integer),20))
next
My main problem is in trying to create the name of the array (which is why I have used the ? in the above example)i.e. x1,x2,x3,x4,x5 variable that will be assigned to the createinstance of the array.
Many thanks for you help.
Andrew