<PackageReference Include="Castle.Core" Version="4.3.1" />

CollectionExtensions

public static class CollectionExtensions
public static bool AreEquivalent<T>(IList<T> listA, IList<T> listB)

Determines if two lists are equivalent. Equivalent lists have the same number of items and each item is found within the other regardless of respective position within each.

public static T Find<T>(this T[] items, Predicate<T> predicate)

public static T[] FindAll<T>(this T[] items, Predicate<T> predicate)

public static int GetContentsHashCode<T>(IList<T> list)

Generates a HashCode for the contents for the list. Order of items does not matter.

public static bool IsNullOrEmpty(this IEnumerable this)

Checks whether or not collection is null or empty. Assumes collection can be safely enumerated multiple times.