title: Extension Method for SqlDataReader?
body: <p>We have run a conversion tool on an old project which came from VB6.</p>
  
  <p>We're substituting OLEDB with Ado.Net, and RecordSets with SqlDataReaders.</p>
  
  <p>But the converted code always does a <code>rs.Fields['FirstName']</code> reference, which I guess would be <code>rs['FirstName']</code> with the database reader (where rs is now q SqlDataReader.</p>
  
  <p>Instead of going through all the code, is there a way I could create an extension method on SqlDataReader, which would then make use of "<code>Fields['FieldName']</code>"?</p>
  
  <p>This is my current attempt:</p>
  
  <pre><code>public static class SqlUtils
      {
          public static object Fields(this SqlDataReader dataReader, string fieldname)
          {
              return dataReader[fieldname];
          }
      }
  </code></pre>
  
  <p>However, this works with:</p>
  
  <pre><code>Console.WriteLine(reader.Fields("First").ToString());
  </code></pre>
  
  <p>I need to handle:</p>
  
  <pre><code>Console.WriteLine(reader.Fields["First"].ToString());
  </code></pre>
  
  <p>Note, [], not ().</p>