class TestType : Object {} void func() { Type t = Type.INVALID; switch(t) { case typeof(string): case typeof(Object): case typeof(TestType): break; default: break; } }