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> 对象进行比较的集合。

返回

true 如果当前 SortedSet<T> 对象等于 other,则为 ;否则为 false

实现

例外

othernull

注解

此方法忽略元素的顺序以及任何重复的元素。other

如果表示的 other 集合是与 SortedSet<T> 当前 SortedSet<T> 对象具有相同相等比较器集合,则此方法是一个 O(log n) 操作。 否则,此方法是一个O(n + m)操作,其中n元素的数量和m元素数otherCount

适用于