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

定義

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

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

實作

例外狀況

一律擲回。

備註

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

適用於

另請參閱