Is there a better alternative than this to ‘switch on type’?
Seeing as C# can’t switch on a Type (which I gather wasn’t added as a special case because is relationships mean that more than one distinct case might apply), is there a better way to simulate switching on type other than this? void Foo(object o) { if (o is A) { ((A)o).Hop(); } else if … Read more