SortedSet<T>.SetEquals(IEnumerable<T>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷目前 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> 物件做比較。
傳回
true若當前SortedSet<T>物件等於;other否則,。 false
實作
例外狀況
other 是 null。
備註
此方法忽略元素的順序及中 other重複元素。
若所other代表的集合與當前SortedSet<T>物件具有相同的等號比較器,SortedSet<T>則此方法為操作O(log n)。 否則,此方法是一個 O(n + m) 運算,其中 n 是 中的 other 元素數,且 m 為 Count。