Hi
What does this statement does
await Task.Delay(1000);
Thanks
Hi
What does this statement does
await Task.Delay(1000);
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jobin SPosted May 4, 2024, 8:57 AM
Hi Ramco,
It creates a task that represents a delay for a specified period of time. In this case, the delay is for 1,000 milliseconds (1 second)
This statement explains the role of
awaitin asynchronous programming, where it allows other tasks to run while waiting for a potentially time-consuming operation to finish.