ICollection<T>.Add(T) Method

Definition

将项添加到 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)

Parameters

item
T

要添加到 ICollection<T> 的对象。The object to add to the ICollection<T>.

Exceptions

ICollection<T> 为只读。The ICollection<T> is read-only.

Applies to

See also