更新时间:2023-02-11 21:58:09
如果您的匿名方法/函数是无参数的,则必须分配();
If your anonymous methods/functions are paramless, you must assign with ();
v1 := GetHandler();
在没有括号的情况下,Delphi将尝试将功能分配给变量.括号告诉它调用该函数并将函数结果分配给该变量.
Without the parentheses Delphi will try to assign the function to the variable. The parens tell it to invoke the function and assign the function result to the variable.