title: Passing an array of objects to Attribute constructor
body: <p>I have custom attribute that takes array of objects. I am trying to pass an array of objects to it, but receive compiler error: </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>Here is the code:</p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Class)]
  public class MyAttribute : Attribute
  {
      public MyAttribute(Person[] people)
      {
           People = people;
      }
  
      public Person[] People{get; private set;}
  }
  
  public class Person
  {
      public string Name{get;set;}
      public string LastName{get;set;}
  }
  </code></pre>
  
  <p>I saw some articles online, but haven't seen any closer to mine. Am I doing something wrong or it is bug? If it is not bug can someone explain why I can't pass array of <code>Person</code>? I tried array of string and it works fine.</p>