title: How can I compare two System.Types?
body: <p>I have done this a gazillion times before but my memory fails me and I feel somewhat stupid asking this.</p>
  
  <p>How do I compare two runtime types? I assume System.Type does not override the == operator and therefore the operator does a reference equality check.</p>
  
  <p>I want to do a value equality. Like:</p>
  
  <pre><code>someObject.GetType() == GetTypeFromSomeAssemblyUsingReflection(
                                                  "Namespace.TypeName",
                                                  objAssemblyToGetTheTypeFrom);
  </code></pre>
  
  <p>I could use <code>IsAssignableFrom()</code> but that would not be accurately what I am trying to do as it would broaden the scope. I want to just equate the types just as I'd do with:</p>
  
  <pre><code>if obj is Cat // where Cat is the name of a class
  </code></pre>
  
  <p>or </p>
  
  <pre><code>if ( (obj as Cat) != null )
  </code></pre>