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.

public:
 System::Collections::Immutable::IImmutableSet<T> ^ Union(System::Collections::Generic::IEnumerable<T> ^ other);
public System.Collections.Immutable.IImmutableSet<T> Union (System.Collections.Generic.IEnumerable<T> other);
abstract member Union : seq<'T> -> System.Collections.Immutable.IImmutableSet<'T>
Public Function Union (other As IEnumerable(Of T)) As IImmutableSet(Of T)

參數

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.

備註

包含在 other 中的任何重複元素都會被忽略。Any duplicate elements contained in other are ignored.

適用於