title: Get overridden property attribute
body: <p>I have a custom attribute like this:</p>
  
  <pre><code>public class PropertyInfoAttribute : Attribute
  {
      public bool IsAutoComplete { get; set; }
  }
  </code></pre>
  
  <p>And there is a class like this:</p>
  
  <pre><code>public class Article
  {
      public virtual int Order { get; set; }
      //other properties
  }
  </code></pre>
  
  <p>In another class,which inherits from Article, I override Order property and declare the attribute for it like this:</p>
  
  <pre><code>public class ArticleDetails : Article
  {
      [PropertyInfo(IsAutoCompele = true)]
      public override int Order { get; set; }
  }
  </code></pre>
  
  <p>The problem appears when I want to get attributes by using the GetCustomAttributes method in PropertyInfo class. I do it like this:</p>
  
  <pre><code>PropertyInfo propInfo = //do something for getting property info from the
                          //ArticleDetails class;
  
  var attr = propInfo.GetCustomAttribute&lt;PropertyInfoAttribute&gt;();
  </code></pre>
  
  <p>But it returns nothing! I don't know why!</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I get property info in this method:</p>
  
  <pre><code>    public static void InitPropertyInfoAttribute&lt;TModel, TProperty&gt;(MvcHtmlString source, Expression&lt;Func&lt;TModel, TProperty&gt;&gt; expression)
      {
          PropertyInfo propInfo = (expression.Body as MemberExpression).Member as PropertyInfo;
      }
  </code></pre>