title: Extension method to get StringLength value
body: <p>I want to write an extension method to get the value of the MaximumLength property on the StringLength attribute.</p>
  
  <p>For example, I have a class:</p>
  
  <pre><code>public class Person
  {
      [StringLength(MaximumLength=1000)]
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>I want to be able to do this:</p>
  
  <pre><code>Person person = new Person();
  int maxLength = person.Name.GetMaxLength();
  </code></pre>
  
  <p>Would this be possible using some sort of reflection?</p>