17 if (list.Count != other.Count)
20 List<T> firstNotSecond = list.Except(other).ToList();
21 List<T> secondNotFirst = other.Except(list).ToList();
22 return firstNotSecond.Count == 0 && secondNotFirst.Count == 0;
Extensions for the List<T> class.
static bool HasSameContentAs< T >(this List< T > list, List< T > other)
Compares to lists for content equality.