OK, well you could try my previous approach which I've adjusted so that the order of elements in the arrays is no longer important. The changes are highlighted:
using System;
using System.Collections.Generic;
using System.Linq;
class Int32ArrayEqualityComparer : IEqualityComparer<int[]>
{
public bool Equals(int[] ia1, int[] ia2)
{
if (ia1 == null || ia2 == null) return false;
if (ia1.Length != ia2.Length) return false;
Array.Sort(ia1);
Array.Sort(ia2);
for(int i = 0; i < ia1.Length; i++)
{
if (ia1[i] != ia2[i]) return false;
}
return true;
}
public int GetHashCode(int[] ia)
{
if (ia == null || ia.Length == 0) return 0;
int combined = ia[0];
for(int i = 1; i < ia.Length; i++) combined ^= ia[i];
return combined.GetHashCode();
}
}
class Test
{
static void Main()
{
List<int[]> result = new List<int[]> {new int[]{1,2,3}, new int[]{4,5,6} };
List<int[]> result1 = new List<int[]> {new int[]{3,2,1}, new int[]{7,8,9} };
List<int[]> result2 = result.Except(result1, new Int32ArrayEqualityComparer()).ToList();
// check it worked
foreach(int[] ia in result2)
{
foreach(int i in ia) Console.Write("{0} ", i);
Console.WriteLine();
}
Console.ReadKey();
}
}