title: How can I get a List<int> from LINQ to XML that produces List<List<int>>?
body: <p>I have an XML snippet as follows:</p>
  
  <pre><code>&lt;PerformancePanel&gt;
      &lt;LegalText&gt;
          &lt;Line id="300" /&gt;
          &lt;Line id="304" /&gt;
          &lt;Line id="278" /&gt;
      &lt;/LegalText&gt;
  &lt;/PerformancePanel&gt;
  </code></pre>
  
  <p>I'm using the following code to get an object:</p>
  
  <pre><code>var performancePanels = new
  {
      Panels = (from panel in doc.Elements("PerformancePanel")
                select new
                {
                    LegalTextIds = (from legalText in panel.Elements("LegalText").Elements("Line")
                                    select new List&lt;int&gt;()
                                    {
                                        (int)legalText.Attribute("id")
                                    }).ToList()
                 }).ToList()
  };
  </code></pre>
  
  <p>The type of <code>LegalTextIds</code> is <code>List&lt;List&lt;int&gt;&gt;</code>. How can I get this as a <code>List&lt;int&gt;?</code></p>