Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Wait some seconds without blocking UI execution

async Task PutTaskDelay()
{
    await Task.Delay(5000);
} 

private async void btnTaskDelay_Click(object sender, EventArgs e)
{
    await PutTaskDelay();
    MessageBox.Show("I am back");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Wait #seconds #blocking #UI #execution
ADD COMMENT
Topic
Name
4+1 =