title: Group List of Dictionaries by a Dictionary-key (C#)
body: <p>I have a List of Dictionaries of type <code>&lt;String, String&gt;</code>. Dictionaries have the keys Revenue and Month.</p>
  
  <p>A typical entry could be: Revenue = "10.080", Month = "1/2011"</p>
  
  <p>I would like to get the revenue totals for each month, so I tried:</p>
  
  <pre><code>List&lt;decimal&gt; monthsTotals = data.Select(d =&gt; Convert.ToDecimal(d["Revenue"]))
      .GroupBy(d =&gt; d["Month"]).ToList&lt;decimal&gt;();
  </code></pre>
  
  <p>This does not work. The expression <code>d["Month"])</code> is underlined. </p>
  
  <blockquote>
    <p>Cannot apply indexing with [] to an expression of type 'decimal'.</p>
  </blockquote>