I want to run listOrders() on a separate thread and make it awaitable. I have a method of this form, that compiles and works OK
private Task<ClearedOrdersReport> listOrdersAwaitable(int a, int b)
{
Task<ClearedOrdersReport> t = Task.Run(() =>
listOrders(a, b));
return t;
}
I now want to add a second line to execute before the listOrders() call. I thought it would be trivial to change the single line lambda into a block style lambda, but I cannot figure out what the correct syntax is to get it to compile ? I am probably missing something obvious, but any help would be appreciated. Thanks