title: C# Apply Attribute to Dynamic object
body: <p>Assuming that I have the following Attribute class </p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Property)]
  public class MetadataAttribute : Attribute
  {
      public bool OutputDirection { get; set; }
      public int Size { get; set; }
  }
  </code></pre>
  
  <p>I want to know if there is a way that I can apply that attribute to a dynamic object. </p>
  
  <pre><code>new { [MetadataAttribute()]Foo = 3}
  </code></pre>