BindingList<T>.ClearItems 方法

定义

移除集合中的所有元素。Removes all elements from the collection.

protected:
 override void ClearItems();
protected override void ClearItems ();
override this.ClearItems : unit -> unit
Protected Overrides Sub ClearItems ()

注解

ClearItems 方法从 Items 属性表示的集合中移除所有项。The ClearItems method removes all the items from the collection represented by the Items property.

ClearItems 在清除集合之前调用 EndNew 方法并在清除后引发 ListChanged 事件。ClearItems calls the EndNew method before clearing out the collection and raises the ListChanged event after it has been cleared.

适用于

另请参阅