ReadOnlyCollection<T>.ICollection<T>.Add(T) 方法

定義

將項目加入至 ICollection<T>。 這個實作一律會擲回 NotSupportedException

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

參數

value
T

要加入至 ICollection<T> 的物件。

實作

例外狀況

一律擲回。

備註

這個成員是明確介面成員實作, 只有在 ReadOnlyCollection<T> 執行個體轉換成 ICollection<T> 介面時,才能使用這個成員。

適用於