I’m searching for a way to auto compare an object propriety to a list of values inside a lambda expression.
For example I have this lambda expression:
List<MyObjectType> myObjectList = GetObjectValues();
List<MyObjectType> filterdObjectList = myObjectList.Where(x => x.objectProp == ??a list of values??)
Basicly I need to filter my list of objects after the "objectProp" that can have multiple valid values.(Note: I do not want to use "Foreach")
1 Answer