ImmutableHashSet<T>.IImmutableSet<T>.Union(IEnumerable<T>) 方法

定义

创建一个新的不可变集,该集包含存在于当前集或指定集合中的所有元素。Creates a new immutable set that contains all elements that are present in either the current set or in the specified collection.

 virtual System::Collections::Immutable::IImmutableSet<T> ^ System.Collections.Immutable.IImmutableSet<T>.Union(System::Collections::Generic::IEnumerable<T> ^ other) = System::Collections::Immutable::IImmutableSet<T>::Union;
System.Collections.Immutable.IImmutableSet<T> IImmutableSet<T>.Union (System.Collections.Generic.IEnumerable<T> other);
Function Union (other As IEnumerable(Of T)) As IImmutableSet(Of T) Implements IImmutableSet(Of T).Union

参数

other
IEnumerable<T>

从中添加元素的集合。The collection to add elements from.

返回

已添加项的新不可变集;或者原始集(如果所有项已在该集内)。A new immutable set with the items added; or the original set if all the items were already in the set.

实现

注解

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

适用于