Table of Contents

Method HasSameElementsAs

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

HasSameElementsAs<T>(IEnumerable<T>, IEnumerable<T>)

Checks if two lists have the same elements, regardless of their order.

[Version(3, 0, 0)]
public static bool HasSameElementsAs<T>(this IEnumerable<T> first, IEnumerable<T> second)

Parameters

first IEnumerable<T>

The first collection to compare.

second IEnumerable<T>

The second collection to compare.

Returns

bool

True if both collections contain the same elements, false otherwise.

Type Parameters

T

The type of elements in the lists.