ArrayListStatic: Repeat

Repeat

Creates a new ArrayList and fills it with the supplied value the specified number of times.



 Public Function Repeat(
	  ByRef Value As Variant,
	  ByVal Count As Long ) As ArrayList

Parameters

Value
[ByRef] Variant. The value to fill the ArrayList with.
Count
[ByVal] Long. The number of times the value is to be added to the list.

Return Values

ArrayList -  An ArrayList with Count elements, all of which are copies of Value.

Examples

The following example creates an ArrayList containing 20 strings with the letter "a".

 Set List = ArrayList.Repeat("a", 20)
 

See Also

Project CorLib Overview

Class ArrayListStatic Overview