for in SubClass



for in | SubClass
Pas2JS pascal source code
type TBase = class end; type TChild = class(TBase) end; var a: array of TChild; var b: TBase; var c: TChild; a.Add(TChild.Create); for b in a do WriteLn(b.ClassName); for c in a do WriteLn(b.ClassName); {<<< RESULT - CONSOLE LOG >>> ----------------------------- TChild TChild ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}