Janice Caron Wrote:
> I like the following idea: if the case statement specifies a type,
> check that the object can be implicitly cast to that type; if the case
> statement specifies a value, check for equality. So:
>
> switch(typeof(a))
> {
> case B1: // RTTI dynamic cast test
> // ...
>
> case B2:
> // ...
> }
>
there is no need for RTTI for *implicit* cast.