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.

适用于

另请参阅