Collection.Clear Collection.Clear Collection.Clear Collection.Clear Method

定义

删除 Visual Basic Collection 对象的所有元素。Deletes all elements of a Visual Basic Collection object.

public:
 void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()

实现

示例

Dim customers As New Microsoft.VisualBasic.Collection()
' Insert code that adds customers to collection.
customers.Clear()

注解

方法Clear将清空集合并将其Count属性重置为0。The Clear method empties the collection and resets its Count property to 0.

适用于