I\'m reading up more about async here: http://msdn.microsoft.com/en-us/library/hh873173(v=vs.110).aspx
Going through this example:
Task [
If I already did this: Task recommendation = await Task.WhenAny(recommendations); Why do this: if (await recommendation) BuyStock(symbol);
Because Task.WhenAny
returns a Task
and you want to unwrap the outter Task
to retrieve the resulting bool. You could do the same by accessing the Task.Result
property of the returned Task