title: How to get DisplayAttribute of a property by Reflection?
body: <p>I have a Helper method like this to get me the PropertyName (trying to avoid magic strings)</p>
  
  <pre><code>public static string GetPropertyName&lt;T&gt;(Expression&lt;Func&lt;T&gt;&gt; expression)
          {
              var body = (MemberExpression) expression.Body;
              return body.Member.Name;
          }
  </code></pre>
  
  <p>However sometimes my PropertyNames aren't named well either. So I would like to rather use the DisplayAttribute.</p>
  
  <pre><code>[Display(Name = "Last Name")]
  public string Lastname {get; set;}
  </code></pre>
  
  <p>Please be aware I am using Silverlight 4.0.  I couldnt find the usual namespace  DisplayAttributeName attribute for this.</p>
  
  <p>How can I change my method to read the attribute (if available) of th eproperty instead?</p>
  
  <p>Many Thanks,</p>