Invoke a non anonymous action or function to Task.Factory.StartNew() with more than one parameter

127 Views Asked by At

I want to use Task.Factory.StartNew() and invoke a named (non-anonymous) function into the StartNew(), Because I face an error that says

public static void Request<P, R>(RequestDelegateParamResult<P, R> del, P parameters, out R result, bool showError = true)
        {
            ...
            TaskFactory.StartNew(() => { del(parameters, out result) });
            ...
        }

enter image description here

What's your solution?

Thanks

0

There are 0 best solutions below