title: How do you get the all properties of a class and its base classes (up the hierarchy) with Reflection? (C#)
body: <p>So what I have right now is something like this:</p>
  
  <pre><code>PropertyInfo[] info = obj.GetType().GetProperties(BindingFlags.Public);
  </code></pre>
  
  <p>where <code>obj</code> is some object.</p>
  
  <p>The problem is some of the properties I want aren't in <code>obj.GetType()</code> they're in one of the base classes further up.  If I stop the debugger and look at obj, the I have to dig through a few "base" entries to see the properties I want to get at.  Is there some binding flag I can set to have it return those or do I have to recursively dig through the <code>Type.BaseType</code> hierarchy and do <code>GetProperties</code> on all of them?</p>