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

定义

将某项添加到集内。Adds an item to the set.

 virtual void System.Collections.Generic.ICollection<T>.Add(T item) = System::Collections::Generic::ICollection<T>::Add;
void ICollection<T>.Add (T item);
Sub Add (item As T) Implements ICollection(Of T).Add

参数

item
T

要添加到集中的对象。The object to add to the set.

实现

异常

该集为只读。The set is read-only.

注解

此成员是显式接口成员实现。This member is an explicit interface member implementation. 它只能在 ImmutableHashSet<T> 实例被强制转换为 ICollection<T> 接口时使用。It can be used only when the ImmutableHashSet<T> instance is cast to an ICollection<T> interface.

适用于