ReadOnlyDictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Clear 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
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 异常。