title: Cannot get attribute from PropertyInfo c#
body: <p>I have a class and interface set up like this:</p>
  
  <pre><code>public partial interface INav_Item 
  {
          [FieldID("df918977-369c-4a06-ac38-adb8741b5f75")]
          string Title  {get; set;}
  }
  
  
  public partial class Nav_Item  : INav_Item 
  {
          [FieldID("df918977-369c-4a06-ac38-adb8741b5f75")]
          public virtual string Title  {get; set;}
  }
  </code></pre>
  
  <p>And then I have this class inherited:</p>
  
  <pre><code>public class MenuItem : Nav_Item
  {
          public virtual IEnumerable&lt;MenuItem&gt; Children { get; set; }
  
          //some other properties
  }
  </code></pre>
  
  <p>I'm now trying to instantiate an object of type <code>MenuItem</code>, and trying to get the attributes from the Inherited class (I can't instantiate <code>MenuItem</code> directly, because the type is being passed in from other classes)</p>
  
  <pre><code>object obj = Activator.CreateInstance(type);
  
  foreach (PropertyInfo propInfo in type.GetProperties())
  {
              FieldAttribute sfi =(FieldAttribute)propInfo.PropertyType.GetCustomAttribute(typeof(FieldAttribute));
  
  }
  </code></pre>
  
  <p>But this is giving me <code>sfi</code> to be <code>null</code>. I've also debugged to try getting all the attributes:</p>
  
  <pre><code>propInfo.PropertyType.GetCustomAttributes()
  </code></pre>
  
  <p>.. but this is only giving me the system attributes (type and something else), but my own attributes are just not there? Is this is because the class is inherited? How can I get the attribute value?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The attribute class is defined as this:</p>
  
  <pre><code>public class FieldIDAttribute : Attribute
  {
      private string _id;
  
      public FieldAttribute(string Id)
      {
          _id = Id;
      }
  
      public ID TheFieldID
      {
          get
          {
              return new ID(_id);
          }
      }
  }
  </code></pre>