title: Access to properties of abstract class with reflection
body: <p>I have an abstract class — let's name it <code>Base</code>. This class contains some properties. Moreover, I have another class, inherited from class <code>Base</code> — let's name it <code>Child</code>. <code>Child</code> is not abstract.</p>
  
  <p>I want to access the properties from class <code>Base</code> with Reflection, and <strong>only</strong> those properties declared in <code>Base</code>.</p>
  
  <p>The following code is of course not possible, because I can't create an instance of an abstract class</p>
  
  <pre><code>Base base = new Base();
  Type type = base.GetType();
  PropertyInfo[] propInfos =
      type.GetProperties(
          BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly
      );
  </code></pre>
  
  <p>The following code is possible, but I get all properties, those defined in <code>Base</code> as well as those defined in <code>Child</code>.</p>
  
  <pre><code>Child child = new Child();
  Type type = child.GetType();
  PropertyInfo[] propInfos =
      type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
  </code></pre>
  
  <p>How can I get all properties of class <code>Base</code> via Reflection?</p>