runtime type and that bizarre "is()"

spir denis.spir at gmail.com
Sun Nov 14 04:27:01 PST 2010


On Sun, 14 Nov 2010 04:09:22 -0800
Jonathan M Davis <jmdavisProg at gmx.com> wrote:

> If you are dealing with a class hierarchy and you want to know whether a base 
> class reference referes to a particular derived class object, I believe that the 
> correct way to do it is cast it to the derived type and check whether it is 
> null. If it's non-null, then it is that derived type. If it's null, then it 
> isn't.

Oh, yes, thank you very much, Jonathan.

denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d-learn mailing list