Wenn du mit "TFunc = reference to function" leben kannst:
Delphi-Quellcode:
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses System.SysUtils;
type
TMyObject = class
class function MyClassFunction(): String; virtual; abstract;
function MyObjectFunction(): String; virtual; abstract;
end;
function myLoseHerumschlabberndeStringFunction(): String;
begin
Result := 'Hallo Welt';
end;
var
myStringFunc: TFunc<String>;
begin
myStringFunc := TMyObject.MyClassFunction;
myStringFunc := TMyObject.Create().MyObjectFunction;
myStringFunc := myLoseHerumschlabberndeStringFunction;
end.