Function Pointer ClassName



Function Pointer ClassName | ClassType
Pas2JS pascal source code
type TClassA = class(TObject); type TClassB = class end; var a1: array of function: TClass; a1.Add(TObject.ClassType); a1.Add(TClassA.ClassType); a1.Add(TClassB.ClassType); //var a2: array of function: String; var a2: array of String; a2.Add(TObject.ClassName); a2.Add(TClassA.ClassName); a2.Add(TClassB.ClassName); var i: Integer; for i := 0 to High(a1) do WriteLn(a1[i]().ClassName); for i := 0 to High(a2) do WriteLn(a2[i]); {<<< RESULT - CONSOLE LOG >>> ----------------------------- TObject TClassA TClassB TObject TClassA TClassB ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}