Dictionary<TKey,TValue>.KeyCollection.ICollection<TKey>.Clear 方法
定义
从 ICollection<T> 中移除所有项。Removes all items from the ICollection<T>. 此实现始终引发 NotSupportedException。This implementation always throws 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
实现
例外
始终引发。Always thrown.
注解
Count 将设置为零,同时还会释放集合元素中其他对象的引用。Count is set to zero, and references to other objects from elements of the collection are also released.