In my Delphi development,
I want to pass an “array of const”(that can contains class too) to a procedure, and in procedure loop on elements and detect type of element as bellow.
Procedure Test(const Args : array of const);
begin
end;
and in my code call it with some variables
Procedure Test();
begin
cls := TMyObject.create;
i := 123;
j := 'book';
l := False;
Test([i,j,l, cls, 37.8])
end;
How loop on sent array elements and detect it’s type?
1 Answer