You declare and use arrays of an object type just as you would declare and use an array of any data type. The members of this array can be retrieved by their index, and can be manipulated as any object of this type would be. Arrays also have built-in functionality for searching and sorting that can be accessed through the array variable. For more information on these methods, see Array Class.
To create an array of objects
-
Declare the array as shown in the sample code below. Because arrays are zero-based, they contain one member more than the upper bound you declare.
Dim x(10) As Widget ' Contains 11 members, from x(0) to x(10).