title: Polymorphic Enums for state handling
body: <p>how do i handle Enums without using switch or if statements in C#?</p>
  
  <p>For Example</p>
  
  <pre><code>enum Pricemethod
  {
      Max,
      Min,
      Average
  }
  </code></pre>
  
  <p>... and i have a class Article</p>
  
  <pre><code> public class Article 
  {
      private List&lt;Double&gt; _pricehistorie;
  
      public List&lt;Double&gt; Pricehistorie
      {
          get { return _pricehistorie; }
          set { _pricehistorie = value; }
      }
  
      public Pricemethod Pricemethod { get; set; }
  
      public double Price
      {
          get {
              switch (Pricemethod)
              {
                  case Pricemethod.Average: return Average();
                  case Pricemethod.Max: return Max();
                  case Pricemethod.Min: return Min();
              }
  
          }
      }
  
  }
  </code></pre>
  
  <p>i want to avoid the switch statement and make it generic. </p>
  
  <p>For a specific Pricemethod call a specific Calculation and return it.</p>
  
  <pre><code>get { return CalculatedPrice(Pricemethod); }
  </code></pre>
  
  <p>Wich pattern is to use here and maybe someone have a good implementation idea.
  Searched already for state pattern, but i dont think this is the right one.</p>