I would like to write a function GetHashCodeOfList() which returns a hash-code of a list of strings regardless of order. Given 2 lists with the same strings sho
GetHashCodeOfList()
A lot less code but maybe the performance isn't as good as the other answers:
public static int GetOrderIndependentHashCode(this IEnumerable source) => source == null ? 0 : HashSet.CreateSetComparer().GetHashCode(new HashSet(source));