C# switch on type
<p>C# doesn't support switching on the type of an object. What is the best pattern of simulating this:</p>

<pre><code>switch (typeof(MyObj))
    case Type1:
    case Type2:
    case Type3:
</code></pre>

<p>Thanks!</p>
