InterviewSolution
| 1. |
How To Make Sleep For Specific Time In Uwp App Development? |
|
Answer» Previously in Silverlight windows phone, Thread.Sleep() Method was used to suspends the current thread for the specified AMOUNT of time, but it is not available for Windows 10 UWP App framework. So alternative is to use the Task.Delay() method instead. For example to MAKE app to sleep for 5 SECONDS, we can write below code in UWP: await Task.Delay(TimeSpan.FromSeconds(5)); Previously in Silverlight windows phone, Thread.Sleep() Method was used to suspends the current thread for the specified amount of time, but it is not available for Windows 10 UWP App framework. So alternative is to use the Task.Delay() method instead. For example to make app to sleep for 5 seconds, we can write below code in UWP: await Task.Delay(TimeSpan.FromSeconds(5)); |
|