title: Is there a better alternative than this to 'switch on type'?
body: <p>Seeing as C# can't <code>switch</code> on a Type (which I gather wasn't added as a special case because <code>is</code> relationships mean that more than one distinct <code>case</code> might apply), is there a better way to simulate switching on type other than this?</p>
  
  <pre><code>void Foo(object o)
  {
      if (o is A)
      {
          ((A)o).Hop();
      }
      else if (o is B)
      {
          ((B)o).Skip();
      }
      else
      {
          throw new ArgumentException("Unexpected type: " + o.GetType());
      }
  }
  </code></pre>