Answers for "Wait some seconds without blocking UI execution"

C#
0

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");
}
Posted by: Guest on January-22-2021

C# Answers by Framework

Browse Popular Code Answers by Language