title: Cannot implicitly convert type System.Collections.Generic.IList System.Collections.Generic.List
body: <p>Basically I'm converting a SQL datatable to a generic list which I can successfully do.  But I can't figure out how to return the the list object.  I get a error that say's a variation of- Cannot implicitly convert type System.Collections.Generic.IList to System.Collections.Generic.List      </p>
  
  <p>What would be the correct way to return theList as type List?</p>
  
  <pre><code>public List&lt;MyObject&gt; GetAllMyObjects()
  {
      String command = "select * from names ";
      DataTable tableResult = DataTableToList.ExecuteDataTable(command, CommandType.Text, null,connectionString);
  
      IList&lt;MyObject&gt; theList = DataTableToList.ConvertTo&lt;MyObject&gt;(tableResult);
  
      return // I’m not sure how to return theList here...
  }
  </code></pre>