Esmaeil Chitgar
Esmaeil Chitgar

Reputation: 25

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

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

Upvotes: 0

Views: 129

Answers (0)

Related Questions