ReadOnlyCollection<T>.ICollection<T>.Clear 方法

定义

ICollection<T>.. 中删除所有项 此实现始终引发 NotSupportedException

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

实现

例外

总是抛出。

注解

此成员是显式接口成员实现。 仅当实例强制转换为ReadOnlyCollection<T>接口时ICollection<T>,才能使用它。

适用于