Horje
c# async sleep Code Example
c# async sleep
// Async
await Task.Delay(1000); //when you want a logical delay without blocking the current thread
// Not Async
Thread.Sleep(1000) //when you want to block the current thread.
c# async sleep

private async void Button_Click_1(object sender, RoutedEventArgs e)
{
    label1.Text = "Test";
    await Task.Delay(2000);
    label1.Text = "";
}





Csharp

Related
quit button unity Code Example quit button unity Code Example
format float to time c# Code Example format float to time c# Code Example
how to set a vector 3 variable in csharp Code Example how to set a vector 3 variable in csharp Code Example
c# bytes to string Code Example c# bytes to string Code Example
wpf label text in center Code Example wpf label text in center Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9