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> 接口时使用。

适用于