title: LINQ query for Dictionary items in C#
body: <p>I have a Dictionary where on of the members of DetailedObject is a List. I am trying to write a query against the Dictionary to return all of the items where the DetailedObject has a specific value for one of the fields in it's SubStructure. For example:</p>
  
  <pre><code>public struct SubStructure
  {
    public int Id;
    public string SubSpecificFile;
  }
  
  public class DetailedObject  
  {
    public int Id;
    public List&lt;SubStructure&gt; subs = new List&lt;SubStructure&gt;();
  }
  
  public Dictionary&lt;int, DetailedObject&gt; dict = new Dictionary&lt;string, DetailedObject&gt;();
  </code></pre>
  
  <p>Each SubStructure can appear inside zero or more DetailedObject instances.</p>
  
  <p>I would, for example, like to query "dict" for each DetailedObject whose "subs" collection contains a SubStructure item with the Id of 3. </p>