title: Dapper Results(Dapper Row) with Bracket Notation
body: <p>According to the Dapper documentation, you can get a dynamic list back from dapper using below code :</p>
  
  <pre><code>var rows = connection.Query("select 1 A, 2 B union all select 3, 4");
  
  ((int)rows[0].A)
     .IsEqualTo(1);
  
  ((int)rows[0].B)
     .IsEqualTo(2);
  
  ((int)rows[1].A)
     .IsEqualTo(3);
  
  ((int)rows[1].B)
      .IsEqualTo(4);
  </code></pre>
  
  <p>What is however the use of dynamic if you have to know the field names and datatypes of the fields.
  If I have :</p>
  
  <pre><code>var result = Db.Query("Select * from Data.Tables");
  </code></pre>
  
  <p>I want to be able to do the following :
  Get a list of the field names and data types returned.</p>
  
  <p>Iterate over it using the field names and get back data in the following ways :</p>
  
  <pre><code>result.Fields
  ["Id", "Description"]
  
  result[0].values
  [1, "This is the description"]
  </code></pre>
  
  <p>This would allow me to get</p>
  
  <pre><code>result[0].["Id"].Value
  </code></pre>
  
  <p>which will give results 1 and be of type e.g. Int 32</p>
  
  <pre><code>result[0].["Id"].Type --- what datattype is the value returned
  
  result[0].["Description"]
  </code></pre>
  
  <p>which will give results "This is the description" and will be of type string.</p>
  
  <p>I see there is a results[0].table which has a dapperrow object with an array of the fieldnames and there is also a result.values which is an object[2] with the values in it, but it can not be accessed.  If I add a watch to the drilled down column name, I can get the id.  The automatically created watch is :</p>
  
  <pre><code>(new System.Collections.Generic.Mscorlib_CollectionDebugView&lt;Dapper.SqlMapper.DapperRow&gt;(result as System.Collections.Generic.List&lt;Dapper.SqlMapper.DapperRow&gt;)).Items[0].table.FieldNames[0]   "Id"    string
  </code></pre>
  
  <p>So I should be able to get result[0].Items[0].table.FieldNames[0] and get "Id" back.</p>