Alex Gordon
Alex Gordon

Reputation: 60751

vb.net: clearing contents of System.Collections.ArrayList?

how do i clear all elements in an arraylist?

Upvotes: 1

Views: 4029

Answers (2)

madcolor
madcolor

Reputation: 8170

Dim myAL As New ArrayList()
myAl.Clear()

http://msdn.microsoft.com/en-us/library/system.collections.arraylist.clear.aspx

Also.. With respect to Joel's comment...

Drawbacks of ArrayLists

Upvotes: 1

Jay Riggs
Jay Riggs

Reputation: 53593

Call

arrayList.Clear()

Where arrayList is your ArrayList.

Upvotes: 4

Related Questions