I have an array of integers:
int[] numbers = { 1, 3, 5, 7, 9 };
I also have an array of a custom object that contains an integer. I want to filter the array of custom objects using Lambda to only those matching integers in the numbers array above.
public class SomeStruct
{
public int MyNumber;
}
ArrayOfSomeStruct = ArrayOfSomeStruct
.Where(m = m.MyNumber is contained in numbers array);
How is this done?