Click or drag to resize
AlgorithmsEqualSetsT Method (IEnumerableT, IEnumerableT)
Determines if two collections are equal, considered as sets. Two sets are equal if they have have the same items, with order not being significant.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static bool EqualSets<T>(
	IEnumerable<T> collection1,
	IEnumerable<T> collection2
)

Parameters

collection1
Type: System.Collections.GenericIEnumerableT
The first collection.
collection2
Type: System.Collections.GenericIEnumerableT
The second collection.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.EqualSets``1(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``0})"]

Return Value

Type: Boolean
True if collection1 are collection2 are equal, considered as sets.
Exceptions
ExceptionCondition
ArgumentNullExceptioncollection1 or collection2 is null.
Remarks

The default sense of equality for T is used, as defined by T's implementation of IComparable<T>.Equals or object.Equals.

If both collections are Set, Bag, OrderedSet, or OrderedBag collections, it is more efficient to use the EqualTo method on that class.

See Also