title: Will this code correctly determine if two types are equal?
body: <p>I'm a little foggy on <code>System.Type</code> versus an actual class type (like <code>Object</code> or <code>XmlDocument</code>) in .NET... will this code correctly determine if the type of a particular object is equal to a class I specify?</p>
  
  <pre class="lang-vb prettyprint-override"><code>' Given "myObject" (unknown type), and some class type (let's say "MyClass")...
  
  If myObject.GetType.Equals(MyClass)
  
  If TypeOf(myObject) Is MyClass
  
  If myObject.GetType() Is MyClass
  </code></pre>
  
  <p>Which one is correct?</p>
  
  <p>Bonus points if you can provide some information on what a class identifier is versus what a <code>System.Type</code> is. :)</p>
  
  <p><em>Note: The language doesn't matter here, VB.NET or C# is fine, the code above is pseudocode.</em></p>