title: Using an extension method on a dictionary
body: <p>I am not sure how to use an extension method on a dictionary. How do I specify that I need the function applied to the value and not the key?</p>
  
  <p>Here's a sample code applying the Sum extension method on a list of doubles and a dictionary whose values are doubles. The list extension methods works fine but the dictionary extension method is asking for a selector function. </p>
  
  <pre><code>    static void Main(string[] args)
      {
          List&lt;double&gt; list = new List&lt;double&gt;();
          list.Add(34.2);
          list.Add(234);
          Console.WriteLine(list.Sum());
  
          Dictionary&lt;string, double&gt; dictioanary = new Dictionary&lt;string, double&gt;();
          dictioanary.Add("a", 5.34);
          dictioanary.Add("b", 44);
  
          Console.WriteLine(dictioanary.Sum());
          Console.ReadKey();
      }
  </code></pre>