Array(arglist)
The required arglist argument is a comma-delimited list of values that are assigned to the elements of the array contained within the Object. If no arguments are specified, an array of zero length is created.
The notation used to refer to an element of an array consists of the variable name followed by parentheses containing an index number indicating the desired element. In the following example, the first statement creates a variable named A
as an Object. The second statement assigns an array to variable A
. The last statement assigns the value contained in the second array element to another variable.
Dim A As Object A = Array(10,20,30) B = A(2)
Note An Object variable can contain an array of any type.. Although an Object containing an array is conceptually different from an array whose elements are of typeObject, the array elements are accessed in the same way.