How to define delegate with needed parameters

Tim tim.oliver at tutanota.com
Thu Jan 14 00:19:24 UTC 2021


I would like to be able to create a delegate but also supply the 
function parameters to be used for the function call. How can I 
go about doing this? Example:

void foo(int i){
}

void bar(string m){
}

doSomething(&foo(q));
doSomething(&bar("test");


More information about the Digitalmars-d-learn mailing list