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

定义

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

实现

例外

在所有情况下。

注解

此成员是显式接口成员实现。 仅当实例强制转换为ReadOnlyDictionary<TKey,TValue>.ValueCollection接口时ICollection<T>,才能使用它。 ICollection<T> 接口指定如果实现接口的集合是只读的,则该 Clear 方法应引发 NotSupportedException 异常。

适用于