title: Casting/Type Conversion Performance
body: <p>I have the following extension method</p>
  
  <pre><code>public static T Field&lt;T&gt;(this DataRow row, string columnName)
  {
      return (T)Convert.ChangeType(row[columnName], typeof(T));
  }
  </code></pre>
  
  <p>It works, but I'm trying to speed it up.  Is there a way to speed that up?  With a case statement and then type specific conversions?  I've tried a few things like using int.Parse, but even though I know I want an int returned, I have to use ChangeType to get it to compile.</p>
  
  <pre><code> return (T)Convert.ChangeType(intVal, typeof(T));
  </code></pre>