1using System.Collections.Generic;
2using System.Linq;
3
4namespace YourProject.Extensions
5{
6 public static class ListExtensions
7 {
8 public static bool SetwiseEquivalentTo<T>(this List<T> list, List<T> other)
9 where T: IEquatable<T>
10 {
11 if (list.Except(other).Any())
12 return false;
13 if (other.Except(list).Any())
14 return false;
15 return true;
16 }
17 }
18}