Código Delphi [-] var clase : TPersona; begin if (clase is TEstudiante) then TEstudiante(clase).do_something else TDocente(clase).do_something_more; end;
var clase : TPersona; begin if (clase is TEstudiante) then TEstudiante(clase).do_something else TDocente(clase).do_something_more; end;