title: How to select objects from a list that has a property that matches an item in another list?
body: <p>Hard question to understand perhaps, but let me explain. I have a <code>List</code> of <code>Channel</code>-objects, that all have a <code>ChannelId</code> property (<code>int</code>). I also have a different <code>List</code> (<code>int</code>) - <code>SelectedChannelIds</code>, that contains a subset of the <code>ChannelId</code>-s.</p>
  
  <p>I want to select (through <code>LINQ</code>?) all the <code>Channel</code>-objects that has a <code>ChannelId</code>-property matching one in the second <code>List</code>.</p>
  
  <p>in other words, I have the following structure:</p>
  
  <pre><code>public class Lists
  {
      public List&lt;Channel&gt; AllChannels = ChannelController.GetAllChannels();
      public List&lt;int&gt; SelectedChannelIds = ChannelController.GetSelectedChannels();
  
      public List&lt;Channel&gt; SelectedChannels; // = ?????
  }
  
  public class Channel
  {
      // ...
      public int ChannelId { get; set; }
      // ...
  }
  </code></pre>
  
  <p>Any ideas on what that LINQ query would look like? Or is there a more effective way? I'm coding for the Windows Phone 7, fyi.</p>