A workaround is to use a 2d array, for example MyArray(1, Integer.MaxValue). As you can see, this array has 2 "rows" and each row has integer.maxvalue elements. So it can hold twice as much data as a single 1d array. Now, to address an element given an int64 value as the index, you can use division and Mod to get the column and row index.
For example,
Code:Dim myarray(1, integer.maxvalue) as Byte Dim longIndex as Int64 = 123456789 Dim column as integer = longindex Mod integer.maxvalue Dim row as Integer = longindex \ integer.maxvalue Dim myByte as Byte = myarray(row, column)




Reply With Quote