title: How do I check if a type is a subtype OR the type of an object?
body: <p>To check if a type is a subclass of another type in C#, it's easy:</p>
  
  <pre><code>typeof (SubClass).IsSubclassOf(typeof (BaseClass)); // returns true
  </code></pre>
  
  <p>However, this will fail:</p>
  
  <pre><code>typeof (BaseClass).IsSubclassOf(typeof (BaseClass)); // returns false
  </code></pre>
  
  <p>Is there any way to check whether a type is either a subclass OR of the base class itself, without using an <code>OR</code> operator or using an extension method?</p>