SortedSet<T>.SymmetricExceptWith(IEnumerable<T>) 方法

定義

修改目前的 SortedSet<T> 物件,使其僅包含目前物件或指定之集合 (但非兩者) 中出現的項目。Modifies the current SortedSet<T> object so that it contains only elements that are present either in the current object or in the specified collection, but not both.

public:
 virtual void SymmetricExceptWith(System::Collections::Generic::IEnumerable<T> ^ other);
public void SymmetricExceptWith (System.Collections.Generic.IEnumerable<T> other);
abstract member SymmetricExceptWith : seq<'T> -> unit
override this.SymmetricExceptWith : seq<'T> -> unit
Public Sub SymmetricExceptWith (other As IEnumerable(Of T))

參數

other
IEnumerable<T>

要與目前 SortedSet<T> 物件比較的集合。The collection to compare to the current SortedSet<T> object.

實作

例外狀況

othernullother is null.

備註

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

如果 other 參數是具有與 SortedSet<T> 目前物件相同之相等比較子的集合 SortedSet<T> ,則這個方法是一 O(n log m) 項作業。If the other parameter is a SortedSet<T> collection with the same equality comparer as the current SortedSet<T> object, this method is an O(n log m) operation. 否則,此方法是一 O(n log m) + O(n log n) 項作業,其中 n 是和中的元素 other 數目 m CountOtherwise, this method is an O(n log m) + O(n log n) operation, where n is the number of elements in other and m is Count.

適用於