ImmutableHashSet<T>.Union(IEnumerable<T>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立新的不可變哈希集,其中包含目前集合或指定集合中存在的所有專案。
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>
這個收藏可以從中加入元素。
傳回
一個新的不可變雜湊集,並加入了這些項目;如果所有物品都已經在套組裡,則只能拿原本的套裝。