Thread.Sleep replacement in .NET for Windows Store

Windows Store apps embrace asynchrony – and an “asynchronous pause” is provided by Task.Delay. So within an asynchronous method, you’d write:

await Task.Delay(TimeSpan.FromSeconds(30));

… or whatever delay you want. The asynchronous method will continue 30 seconds later, but the thread will not be blocked, just as for all await expressions.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)