How to check if char array contains every element in another char array?

Possible duplicate:
LINQ: check if the array is a subset of another

I am trying to determine if there is a way to use LINQ to determine if each element of a subset array is in an array of supernets. For example, with this superset:

{'w','o','k','r','d','o'}

Below is a valid subset:

{'o','k','w','r'}

While they are not valid:

{'o','k','w','r','s'}
{'w','o','k','r','d','o','s'}

The actual superset is the char array that I have in memory. The actual subset is the value in the database table. I am trying to use LINQ to EF to get all the values ​​from a table matching this condition. This is what I have tried so far:

char[] letterArray = letters.ToCharArray();
return we.Words.Where(t =>     letterArray.Join(t.Word.ToCharArray(),
                                    f => f,
                                    s => s, (f, s) => new { s }).Count() == t.Word.Length
                                ).Select(t => t.Word).ToArray();

But when I run this, I get an error:

' "System.Char". ( Int32, String Guid) .

? , ?

+3
2
char[] t1 = {'w','o','k','r','d','o'};

char[] t2 = {'o','k','w','r'};

bool isSubset = !t2.Except(t1).Any();
+1

LINQ , Except Intersect .

char[] superset = { 'w', 'o', 'k', 'r', 'd', 'o' };
char[] subset1 = { 'o', 'k', 'w', 'r' };
char[] subset2 = { 'w', 'o', 'k', 'r', 'd', 'o', 's' };

bool subValid1 = !subset1.Except(superset).Any(); //true
bool subValid2 = !subset2.Except(superset).Any(); //false
0

All Articles