Why not
Dim finalArray as New ArrayList()
Indeed, if you only save a specific type of object, you should use generics.
Dim finalArray as New List(Of Integer)
Dim finalArray as New List(Of String)
Dim finalArray as New List(Of YourFavoriteObject)
(And don't be a sloppy VB6 programmer ... add those perens for constructors and calls to other methods.)
source
share