title: Intersect two collections which contain different types
body: <p>Suppose I have one collection, call it <code>ids</code> it is of type <code>IEnumerable&lt;string&gt;</code>, I have a second collection call it <code>objects</code> it's of type <code>MyObject[]</code>. <code>MyObject</code> has a string property called <code>id</code>. I would like a LINQ statement that returns all off the objects in the <code>objects</code> collection who's <code>id</code> matches any value in the <code>ids</code> collection. <code>ids</code> will be a strict subset of <code>objects.Select(x =&gt; x.id)</code>. Meaning, for every string in <code>ids</code> I know there will be exactly one corresponding <code>MyObject</code> in <code>objects</code>. Can someone post a pure LINQ solution? I've tried a couple things with no luck. I can come up with an iterative solution easily enough so unless it's impossible to do with only LINQ please don't post any.</p>