title: Select Case on an object's type in VB.NET
body: <p>I'm not sure if this valid C#, but hopefully you get the idea. :)</p>
  
  <pre><code>switch (msg.GetType()) {
      case ClassA:
          // blah
      case ClassB:
          // blah 2
      case ClassC:
          // blah 3
  }
  </code></pre>
  
  <p>How would I switch on an object's type but using VB.NET's <code>Select Case</code>?</p>
  
  <p>I'm aware that some might suggest using <a href="http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming" rel="noreferrer">polymorphism</a>, but I'm using a hierarchy of small message classes so that really wouldn't work in my case.</p>