ICollection<T>.Clear ICollection<T>.Clear ICollection<T>.Clear ICollection<T>.Clear Method

定義

ICollection<T> 中移除所有項目。Removes all items from the ICollection<T>.

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

例外狀況

備註

Count 必須設為 0,而且必須已經從集合項目釋放對其他物件的參考。Count must be set to 0, and references to other objects from elements of the collection must be released.

適用於

另請參閱