title: Converting DataTable objects to custom class objects inheriting from DataTable
body: <p>I want to create a class that will add some new methods helpful in using a DataTable class. I want to avoid static classes, so I created a class</p>
  
  <pre><code>MyDataTable : DataTable
  </code></pre>
  
  <p>and my methods there.</p>
  
  <p>How can I convert DataTable objects to MyDataTable objects?
  I already tried</p>
  
  <pre><code>MyDataTable dt2 = (MyDataTable)dt;
  </code></pre>
  
  <p>But it returns a InvalidCastException.</p>
  
  <p>I know now that it doesn't work this way. But I also have no idea how can I solve this. Can anyone help me with this?</p>