Dictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Clear 方法

定義

ICollection<T> 中移除所有項目。 這個實作一律會擲回 NotSupportedException

 virtual void System.Collections.Generic.ICollection<TKey>.Clear() = System::Collections::Generic::ICollection<TKey>::Clear;
void ICollection<TKey>.Clear ();
abstract member System.Collections.Generic.ICollection<TKey>.Clear : unit -> unit
override this.System.Collections.Generic.ICollection<TKey>.Clear : unit -> unit
Sub Clear () Implements ICollection(Of TKey).Clear

實作

例外狀況

一律擲回。

備註

Count 設為零,同時也發行集合元素的其他物件參照。

適用於

另請參閱