I have a list with multiple class that contain a Property that is an Integer (Id).
I have a List of Integer too.
Now, I would like to trim the List of my object to only those class that has the Property in the list of the integer.
Example:
List of MyObject [MyObjectA].Id = 1 [MyObjectB].Id = 2 [MyObjectC].Id = 3 [MyObjectD].Id = 4 List of Integer 1 2 Final list should be [MyObjectA] [MyObjectB]
How can I do it?
You could use contains:
Or a join: