title: Why does GetProperties list a protected property (declared in a generic base class) twice?
body: <p>When I declare the following simple classes:</p>
  
  <pre><code>class Class1&lt;T&gt;
  {
      protected virtual T Prop1 { get; set; }
      protected virtual string Prop2 { get; set; }
  }
  
  class Class2 : Class1&lt;string&gt;
  {
      protected override string Prop1 { get; set; }
      protected override string Prop2 { get; set; }
  }
  </code></pre>
  
  <p>and now I use Reflection to get the properties of Class2 like this:</p>
  
  <pre><code>var hProperties = typeof(Class2).GetProperties(BindingFlags.NonPublic | BindingFlags.Instance);
  </code></pre>
  
  <p>then Prop2 will be listed once while Prop1 will be listed twice! This behaviour seems strange to me. Shouldn't Prop1 and Prop2 be treated as identical??</p>
  
  <p>What can I do to have Prop1 only once in hProperties? I don't want to use BindingFlags.DeclaredOnly as I also want to get other protected properties of Class1 that are not overridden.</p>