Click or drag to resize
IEnumerableExtensionMethodsSetEqualT Method (IEnumerableT, IEnumerableT)
Checks whether the enumerable to compare with is equal to the source enumerable, element wise. If elements are in a different order, the method will still return true. This is different from SequenceEqual which does take order into account

Namespace: SD.Tools.BCLExtensions.CollectionsRelated
Assembly: SD.Tools.BCLExtensions (in SD.Tools.BCLExtensions.dll) Version: 1.0.0.0 (1.0.10.1127)
Syntax
public static bool SetEqual<T>(
	this IEnumerable<T> source,
	IEnumerable<T> toCompareWith
)

Parameters

source
Type: System.Collections.GenericIEnumerableT
The source.
toCompareWith
Type: System.Collections.GenericIEnumerableT
the sequence to compare with.

Type Parameters

T
type of the element in the sequences to compare

Return Value

Type: Boolean
true if the source and the sequence to compare with have the same elements, regardless of ordering

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also