I have a List
PropA
{
int a;
int b;
}
and another List
What you want to do is Join the two sequences. LINQ has a Join operator that does exactly that:
List first;
List second;
var query = from firstItem in first
join secondItem in second
on firstItem.b equals secondItem.b
select firstItem;
Note that the Join operator in LINQ is also written to perform this operation quite a bit more efficiently than the naive implementations that would do a linear search through the second collection for each item.