I have a List<int>
and a List<customObject>
. The customObject class has an ID property. How can I get a List<customObject>
containing only the objects where the ID property is in the List<int>
using LINQ?
Edit: I accepted Konrads answer because it is easier/more intuitive to read.