SortedSet<T>.IntersectWith(IEnumerable<T>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
修改目前的 SortedSet<T> 物件,使其僅包含同時也在指定之集合中出現的項目。
public:
virtual void IntersectWith(System::Collections::Generic::IEnumerable<T> ^ other);
public virtual void IntersectWith (System.Collections.Generic.IEnumerable<T> other);
abstract member IntersectWith : seq<'T> -> unit
override this.IntersectWith : seq<'T> -> unit
Public Overridable Sub IntersectWith (other As IEnumerable(Of T))
參數
- other
- IEnumerable<T>
要與目前 SortedSet<T> 物件比較的集合。
實作
例外狀況
other 為 null。
備註
這個方法會忽略 中 other任何重複的專案。
如果 參數所表示的 other 集合是 SortedSet<T> 與目前 SortedSet<T> 物件相同的相等比較子集合,則這個方法是 O(n) 作業。 否則,這個方法是 O(n + m) 作業,其中 n 是 Count ,而 m 是中的 other項目數目。