"Jacob Carlborg" <[email protected]> wrote in message news:[email protected]... > > What's not possible is when the runtime type is different from the static > type: > > class Base { ... } > class Sub : Base { ... } > > Base b = new Sub; > > In the above code, when inspecting "b" using compile time reflection all > information about "Sub" is gone. It's just a regular "Base". >
Can't you just query compile-time information to see what classes inherit from Base? Then you could just try downcasting to them.
