Dictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Clear Dictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Clear Dictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Clear Method

定义

ICollection<T> 中移除所有项。Removes all items from the ICollection<T>. 此实现始终引发 NotSupportedExceptionThis implementation always throws NotSupportedException.

 virtual void System.Collections.Generic.ICollection<TValue>.Clear() = System::Collections::Generic::ICollection<TValue>::Clear;
void ICollection<TValue>.Clear ();
Sub Clear () Implements ICollection(Of TValue).Clear

实现

异常

注解

Count设置为零, 还会释放对集合的元素的其他对象的引用。Count is set to zero, and references to other objects from elements of the collection are also released.

适用于

另请参阅