ReDim Arrays to alter Dimensions

fezbro

Member
Joined
Jul 24, 2006
Messages
7
Programming Experience
Beginner
I'm in the process of upgrading several applications created by another person, and have an issue with arrars. In nearly all the programs they wrote, they started off declaring single dimension arrays

Public dtBSTZones() As Date

and then later in the program may or may not alter them to multi dimensional arrays

ReDim Preserve dtBSTZones(2, intCount)

ReDim can't change the number of arrary in vb.net

Is there any way around / to fix this?
 
Two-dimensional arrays nearly always translates to single-dimensional array/list of a structure/class, what you typically see as tabular form of data.
 
John

In the original code he declared the array

Public dtBSTZones$() AsDate

and then passes / retrieves the data from functions by referring to it as

dtBSTZones

I assume that the $ in vb6 allowed the entire contents to be passed through by referring to its name? If this is the case, how can i do this in vb.net?

Thanks

Chris
 
The dollar sign was used to denote a String type variable in older classic VB.
 
The dollar sign was used to denote a String type variable in older classic VB.

Which is curious seeing as there is a qualifying "As Date" eh? Hmm..

fezbro; you should not only be translating this code to VB.NET but also upgrading it to use N dimensional data containers wherever possible.. I dont envy you!
 
Which is curious seeing as there is a qualifying "As Date" eh? Hmm..
By "denote" I mean 'indicate' the usage and not as a type signifier if that was what you wondered about. I think it was a writing style like some used 'strMyStringVariable'.
 
Back
Top