title: Getting list of Inherited types doesn't work for all types
body: <p>I wrote a small method to list the inherited types but it doesn't works with a <code>TreeNode</code> for example:</p>
  
  <p>Assume this classes:</p>
  
  <pre><code>class B { }
  class A : B { }
  class C :TreeNode { }
  </code></pre>
  
  <p>And then:</p>
  
  <pre><code>GetInheritedTypes(typeof(A)); //typeof(B)
  GetInheritedTypes(typeof(C)); // 0 items
  </code></pre>
  
  <p>The method to list them:</p>
  
  <pre><code>List&lt;Type&gt; GetInheritedTypes(Type baseType) 
  { 
      return Assembly.GetAssembly(baseType)
                     .GetTypes()
                     .Where(type =&gt; type != baseType &amp;&amp; type.IsAssignableFrom(baseType))
                     .ToList(); 
  } 
  </code></pre>
  
  <p>Why is <code>GetInheritedTypes(typeof(C))</code> returning 0 items instead of <code>Typeof(TreeNode)</code>?</p>