A vb.net Structured or multi array
Dim MyArray() as Double
This has ZERO elements
Redim MYArray(1)
This has 1 element
Populate
MyArray(0) = 1.5
MyArray(MyArray.getUpperBound(0)) will equal 1.5
MyArray.length will equal 1
So to write this
If MyArray.getUpperBound(0) > 0 then
...Would not work as MyArray has an element in it populated with 1.5
If MyArray.length > 0 then
. This wont work cause if array has no elements then there is a NULL and an error is thrown.
SO THIS MUST Be the best test of an array exists that is populated
... better than If MyArray.length > 0 then
... better than If MyArray.getUpperBound > 0 then
If MyArray IsNot Nothing then
For K as i ...
Go to the complete details ...