title: Custom attribute: An attribute argument must be a constant expression
body: <p>I have defined a custom <code>enum</code> <code>DescriptionAttribute</code> (see my previous question: <a href="https://stackoverflow.com/q/32901771/3799847">Multiple enum descriptions</a>)</p>
  
  <pre><code>public class DescriptionWithValueAttribute : DescriptionAttribute
  {
      public Decimal Value { get; private set; }
  
      public DescriptionWithValueAttribute(String description, Decimal value)
          : base(description)
      {
          Value = value;
      }
  }
  </code></pre>
  
  <p>My <code>enum</code> looks like this:</p>
  
  <pre><code>public enum DeviceType
  {
      [DescriptionWithValueAttribute("Set Top Box", 9.95m)]
      Stb = 1,
  }
  </code></pre>
  
  <p>I get the following error when compiling:</p>
  
  <blockquote>
    <p>An attribute argument must be a constant expression, typeof expression
    or array creation expression of an attribute parameter type</p>
  </blockquote>
  
  <p>I have also tried: <code>[DescriptionWithValueAttribute("Set Top Box", (Decimal)9.95)]</code></p>
  
  <p>Any ideas?</p>