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

定義

判斷目前的 SortedSet<T> 物件和指定的集合是否包含相同項目。

public:
 virtual bool SetEquals(System::Collections::Generic::IEnumerable<T> ^ other);
public bool SetEquals (System.Collections.Generic.IEnumerable<T> other);
abstract member SetEquals : seq<'T> -> bool
override this.SetEquals : seq<'T> -> bool
Public Function SetEquals (other As IEnumerable(Of T)) As Boolean

參數

other
IEnumerable<T>

要與目前 SortedSet<T> 物件比較的集合。

傳回

Boolean

如果目前的 SortedSet<T> 物件等於 other,則為 true;否則為 false

實作

例外狀況

othernull

備註

這個方法會忽略 中的 other 專案和任何重複專案的順序。

如果 所 other 表示的集合是 SortedSet<T> 與目前 SortedSet<T> 物件具有相同相等比較子的集合,則這個方法是 O(log n) 作業。 否則,這個方法是作業 O(n + m) ,其中 n 是 中的 other 專案數目,而 mCount

適用於