Suppose I have the following arrays:
List<int[]> numbers = new List<int[]>(); numbers.Add(new int[] { 1, 2, 3 }); numbers.Add(new int[] { 3, 4, 5 }); numbers.Add(new int[] { 5, 6, 7 }); int[] numbersToFind = new int[] { 4, 5, 6 };
I want to find which of the numbers elements contains one or more values ββin numbersToFind , is there an easy way to do this with LINQ? That is, some code that returns an IEnumerable<int[]> containing int[]{3,4,5} and int[]{5,6,7} in the above example.
How can I do that?
mikel source share