title: Convert a datatable to IList c#
body: <p>i got a code for converting datatable to ilist. which may work but the code not very clear to me. here is code</p>
  
  <pre><code>table.AsEnumerable()
  .Select(r =&gt; table.Columns.ToDictionary(c =&gt; c.ColumnName, c =&gt; r[c]))
  .ToList();
  </code></pre>
  
  <p><strong>what is table.Columns.ToDictionary()...what it does. what is the meaning of c => c.ColumnName, c => r[c]
  what r[c] return. not very clear to me.</strong></p>
  
  <p>i got a another snippet....here it is</p>
  
  <pre><code>var list = new List&lt;DataRow&gt;();
  foreach (var row in table.Rows)
     list.Add(row);
  
  return list;
  </code></pre>
  
  <p>this code is clear to me but i want to know which code has good performance out of 2 different snippet. please discuss. thanks</p>