I was just wondering if a construct like the following c# function call is possible in Delphi:
C# code:
MyFunction(Param1, new MyClass() {property1 = "value1", property2 = true, property3 = 100}, Param3);
As for now in Delphi I should do the following to get that result:
Delphi code:
var
aMyClass: TMyClass;
begin
aMyClass:= TMyClass.Create;
aMyClass.property1:= 'value1';
aMyClass.property2:= True;
aMyClass.property3:= 100;
MyFunction(Param1, aMyClass, Param3);
end;
Much more verbose.
Help appreciate.