ArrayList: ToArray

ToArray

Returns an array of the items in the list.



 Public Function ToArray(
	  Optional ByVal ArrayType As VbVarType = vbVariant ) As Variant

Parameters

ArrayType
[ByVal] Optional. VbVarType. The specific array type to return.  

Default: vbVariant

Return Values

Variant -  An array of items in the list.

Remarks

If an array type other than variant is specified, then the list attempts to convert each item in the list to the specific array type requested. If an item cannot be converted, then an exception is thrown.

No items will be narrowed in the conversion. For example, a Double will not be converted to a Long. An exception will be thrown.

See Also

Project CorLib Overview

Class ArrayList Overview