Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ListExtensions.cs
2{
6 public static class ListExtensions
7 {
15 public static bool HasSameContentAs<T>(this List<T> list, List<T> other)
16 {
17 if (list.Count != other.Count)
18 return false;
19
20 List<T> firstNotSecond = list.Except(other).ToList();
21 List<T> secondNotFirst = other.Except(list).ToList();
22 return firstNotSecond.Count == 0 && secondNotFirst.Count == 0;
23 }
24 }
25}
Extensions for the List<T> class.
static bool HasSameContentAs< T >(this List< T > list, List< T > other)
Compares to lists for content equality.