ImmutableSortedSet<T>.IImmutableSet<T>.Add(T) 方法

定义

将指定的元素添加到此不可变集。Adds the specified element to this immutable set.

 virtual System::Collections::Immutable::IImmutableSet<T> ^ System.Collections.Immutable.IImmutableSet<T>.Add(T value) = System::Collections::Immutable::IImmutableSet<T>::Add;
System.Collections.Immutable.IImmutableSet<T> IImmutableSet<T>.Add (T value);
Function Add (value As T) As IImmutableSet(Of T) Implements IImmutableSet(Of T).Add

参数

value
T

要添加的元素。The element to add.

返回

已添加元素的新集,或者此集(如果该元素已在此集内)。A new set with the element added, or this set if the element is already in the set.

实现

注解

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

System.object NuGet 包System.Collections.Immutable NuGet package

关于不可变集合以及如何安装About immutable collections and how to install

适用于