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> 介面時,才能使用這個成員。

適用於