1
如何清除数组列表中的所有元素?vb.net:清除System.Collections.ArrayList的内容?
如何清除数组列表中的所有元素?vb.net:清除System.Collections.ArrayList的内容?
呼叫
arrayList.Clear()
哪里arrayList
是你的ArrayList。
Dim myAL As New ArrayList()
myAl.Clear()
http://msdn.microsoft.com/en-us/library/system.collections.arraylist.clear.aspx
还..关于乔尔的评论...
假设.Net 2.0或更高版本,请勿使用ArrayLists! – 2009-10-29 18:33:20
为什么不呢? ? ? ? ??? – 2009-10-29 18:37:09
因为他们大多只是在与以前的版本兼容的框架中。 System.Collections.Generic.List(Of T)几乎完全取代了ArrayList。 – 2009-10-30 12:58:35