語言

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

定義

建立新的不可變哈希集,其中包含目前集合或指定集合中存在的所有專案。

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

參數

other
IEnumerable<T>

這個收藏可以從中加入元素。

傳回

一個新的不可變雜湊集,並加入了這些項目;如果所有物品都已經在套組裡,則只能拿原本的套裝。

適用於