title: How can I pass an attribute parameter type with List<string> in C#?
body: <p>How can I pass a List to a construtor?</p>
  
  <p>It shows a message:</p>
  
  <p>Error   14  An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type</p>
  
  <pre><code>public class CustomAuthorize : AuthorizeAttribute {
      private List&lt;string&gt; multipleProgramID;
  
      //constructor
      public CustomAuthorize(List&lt;string&gt; _multipleProgramID) {
          multipleProgramID = _multipleProgramID;
      }
  }
  
  [CustomAuthorize(new List&lt;string&gt;(new string[] { ProgramList.SURVEY_INPUT, ProgramList.SURVEY_OUTPUT } ))]
  [HttpPost]
  public ActionResult DeleteWaterQualityItems(string sourceID, string wqID) {
      // ..other code...
  }
  
  public class ProgramList {
      public const string SURVEY_INPUT = "A001";
      public const string SURVEY_INPUT = "A002";
  }
  </code></pre>