title: C# Linq where list in list
body: <p>I have an list called mainList. 
  Every item in mainList contains another list called detailList.<br>
  I want to select items from mainList where a property in detailList evaluates true. </p>
  
  <p>What I hoped would work:</p>
  
  <pre><code>var list = mainList.Where(x =&gt; x.detailList.Where(y =&gt; y.property == true));
  </code></pre>
  
  <p>This does not work, it can not convert detailList to bool.</p>
  
  <p>So my question is how do I select items in the mainList where that item has a valid property inside his detailList.</p>