title: Linq: Select data into multiple Lists
body: <p>How can I select the result of a query into multiple Lists?  For example,</p>
  
  <pre><code>class Person 
  {
     public string FirstName {get;set;}
     public string LastName {get;set;}
  }
  
  void test()
  {
     var query =
       from i in Persons
       select i;
  
     // now i want to select two lists - list of first names, and list of last names
  
     // approach 1 - run query twice?
     List&lt;string&gt; f = query.Select( i=&gt;i.FirstName).ToList();
     List&lt;string&gt; l = query.Select( i=&gt;i.LastName).ToList();
  
     // approach 2 - turn it into a list first, and break it up
     List&lt;Person&gt; p = query.ToList();
     List&lt;string&gt; f = p.Select( i=&gt;i.FirstName).ToList();
     List&lt;string&gt; l = p.Select( i=&gt;i.LastName).ToList();
  }
  </code></pre>
  
  <p>Problem with approach 1 is I need to run the query twice.
  Problem with approach 2 is I use twice the memory.  When the data set is huge, it may become an issue.</p>