I am trying to create a portable class library (.NET 4.5 / Silverlight 5 / Win Phone 8 / WinRT) that uses the async / await feature set. I found that I needed to enable the Microsoft.Bcl.AsyncNuGet package for this feature to work, so I did just that. Apparently, due to my goals, I don't have access to Task.Delay(0)or Task.FromResult(0). I was wondering what is the next best alternative?
I am currently using: new Task(() => { })(basically a task that does not take any action.)
I'm not sure if this is the best equivalent to any of the previously mentioned patterns.
Update: I seem to be blind and do not see TaskExintellisense on my menu. I leave the question open so that people know what it is, it’s easy to skip because my intellisense kept autocomplete up to TaskExtensions.
source
share