Say I've got an
Array1 [1,2,3]
and a List of arrays Array2 [3,2,4] Array3 [2,16,5]
I need to return only those elements of the List which contain exactly two ints from Array1. In this case, Array2 since integers 2 and 3 intersect;
Thanks
since it's int[] you can use the .Intersect() directly. For example
from a in arrays where a.Intersect(Array1).Count() == 2 select a
//arrays contains Array2 and Array3
from a in objectsWithArray where a.ArrayProperty.Intesect(...