Entfernt alle Elemente aus dem Objekt ArrayList.
Syntax
Object.Clear()
Argumente: Object: Erforderlich. Immer der Name eines ArrayList-Objekts.
Anmerkungen
Das folgende Beispiel veranschaulicht die Verwendung der Clear-Methode.
Beispiel 1:
'Create ArrayList Object
Dim Obj
Set Obj = CreateObject("System.Collections.ArrayList")
'Add Elements to the end of the ArrayList Object
Dim Index
Index = Obj.Add(10)
Index = Obj.Add(40)
Index = Obj.Add(20)
'Output: Obj contains 10, 40, 20
'Removes all elements from the ArrayList Object
Obj.Clear()
'Output: Obj contains empty array list