title: Class not inheriting from object?
body: <p>I am working on a method that is using reflection to inspect parameter types of methods. This methods iterates through the ParameterInfo's and is doing something with the types of those parameters.</p>
  
  <p>I was always under the assumption that if <code>TypeInfo.IsClass</code> is <code>true</code>, that this type is a class and always derives (indirectly) from type <code>object</code> (except when the type is <code>object</code> itself of course). So, if <code>TypeInfo.IsClass</code> is true, <code>TypeInfo.BaseType</code> must be set.</p>
  
  <p>Well my assumption was wrong! There are classes that do NOT derive from type <code>object</code>. And my assumption messed up my code.</p>
  
  <p>For example:</p>
  
  <pre><code>Type type = typeof(int).MakeByRefType();
  </code></pre>
  
  <p><code>type.IsClass</code> will be <code>true</code> and <code>type.BaseType</code> will be <code>null</code>.</p>
  
  <p>If you think about it, it is logical. And I can prevent my code to crash by checking <code>TypeInfo.IsByRef</code>.</p>
  
  <p><strong>Now my question is: are there more such 'exotic' types (besided the ByRef-types and type <code>object</code>) which are a class (<code>IsClass == true</code>) but do not have a base type  (<code>BaseType == null</code>)?</strong></p>
  
  <p>Before you answer: I am only refering to types where <code>IsClass == true</code>! And my example with type <code>int</code> was just an example. It could have been any type. 
  So please no:</p>
  
  <ul>
  <li>Interfaces </li>
  <li>Structs </li>
  <li>Void </li>
  </ul>
  
  <p><strong>Answers so far:</strong></p>
  
  <ul>
  <li>ByRef types  (<code>T&amp;</code>): as descrybed in the question.</li>
  <li>Pointer types (<code>T*</code>): Found by Mark Gravell.</li>
  </ul>