Thread to sleep in Windows Phone

wp8

I am excited to work in Windows Phone. I think that Windows Phone has an amazing future because it’s very easy to transform application in Windows 8 to Windows Phone and vice versa.

If you work in Windows Phone, you will know that Silverlight is the technology behind of it and the same time is a subset of WPF.

If we want to use Task, await, async (.NET 4.5 features) in Windows Phone, we will have to install Microsoft.Bcl.Async.

In this case, WP8 isn’t able to sleep a thread with the classic method Thread.Sleep(). Microsoft says that you have to use Task methods to control the behavior of threads.

But, WP8 doesn’t have the Task.Delay method (.NET 4.5 feature), then we need to install de Microsoft.Bcl.Async package and use TaskEx.Delay()

 

 

Anuncis

Deixa un comentari

Fill in your details below or click an icon to log in:

WordPress.com Logo

Esteu comentant fent servir el compte WordPress.com. Log Out / Canvia )

Twitter picture

Esteu comentant fent servir el compte Twitter. Log Out / Canvia )

Facebook photo

Esteu comentant fent servir el compte Facebook. Log Out / Canvia )

Google+ photo

Esteu comentant fent servir el compte Google+. Log Out / Canvia )

Connecting to %s