Επεξεργασία

Κοινή χρήση μέσω


SortedSet<T>.SetEquals(IEnumerable<T>) Method

Definition

Determines whether the current SortedSet<T> object and the specified collection contain the same elements.

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

Parameters

other
IEnumerable<T>

The collection to compare to the current SortedSet<T> object.

Returns

true if the current SortedSet<T> object is equal to other; otherwise, false.

Implements

Exceptions

other is null.

Remarks

This method ignores the order of elements and any duplicate elements in other.

If the collection represented by other is a SortedSet<T> collection with the same equality comparer as the current SortedSet<T> object, this method is an O(log n) operation. Otherwise, this method is an O(n + m) operation, where n is the number of elements in other and m is Count.

Applies to