title: Convert DataTable to Generic List in C#
body: <p>Disclaimer: I know its asked at so many places at SO.<br>
  My query is a little different.  </p>
  
  <p>Coding Language: C# 3.5</p>
  
  <p>I have a DataTable named cardsTable that pull data from DB and I have a class Cards which have only some properties(no constructor)</p>
  
  <pre><code>public class Cards
  {
      public Int64 CardID { get; set; }
      public string CardName { get; set; }
      public Int64 ProjectID { get; set; }
      public Double CardWidth { get; set; }
      public Double CardHeight { get; set; }
      public string Orientation { get; set; }
      public string BackgroundImage { get; set; }
      public string Background { get; set; }
  }
  </code></pre>
  
  <p>I want to insert the cardsTable data to an object of type List.<br>
  My data will be having null fields in it and so the method should not error when i convert the data. Is the below method the best way?</p>
  
  <pre><code>DataTable dt = GetDataFromDB();
  List&lt;Cards&gt; target = dt.AsEnumerable().ToList().ConvertAll(x =&gt; new Cards { CardID = (Int64)x.ItemArray[0] });
  </code></pre>