ICollection<T>.Add(T) 方法

定義

將項目加入至 ICollection<T>Adds an item to the ICollection<T>.

public:
 void Add(T item);
public void Add (T item);
abstract member Add : 'T -> unit
Public Sub Add (item As T)

參數

item
T

要加入至 ICollection<T> 的物件。The object to add to the ICollection<T>.

例外狀況

ICollection<T> 為唯讀。The ICollection<T> is read-only.

適用於

另請參閱