title: Convert field from a Listitem to a List<T> using LINQ
body: <p>I'm querying a Sharepoint Online database using CAML and getting the requisite ListItemCollection that it returns.  I am only interested in one field of this ListItemCollection and am converting it to a List&lt;T&gt; for use by another function.  Is there a way to do this using LINQ and a lambda function?  </p>
  
  <p>My current code, which works fine, is below (listItems is of type ListItemCollection from the Sharepoint Client Namespace).  </p>
  
  <pre><code>List&lt;string&gt; theList = new List&lt;string&gt;();
  
  foreach(ListItem itm in listItems)  //listItems is type ListItemCollection
  {
     theList.Add(itm["Email_x0020_Address"].ToString());
  }
  </code></pre>
  
  <p>It seems like it should go something like</p>
  
  <pre><code>theList = listItems.ToList&lt;string&gt;(  i =&gt; i["Email_x0020_Address"].ToString()  );
  </code></pre>
  
  <p>or</p>
  
  <pre><code>theList = listItems.Cast&lt;ListItem&gt;().ToList&lt;string&gt;(i =&gt;
                 i["Email_x0020_Address"].ToString());
  </code></pre>
  
  <p>but i'm having trouble with the conversion.  Any help would be appreciated!  Thank you!</p>