Skip to content

Instantly share code, notes, and snippets.

@abdelkader
Created October 20, 2017 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdelkader/f2a23b887bfbb684edefc32f18dd195b to your computer and use it in GitHub Desktop.
Save abdelkader/f2a23b887bfbb684edefc32f18dd195b to your computer and use it in GitHub Desktop.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private async void button1_Click(object sender, EventArgs e)
{
await Run();
}
private async Task Run()
{
await Task.Delay(5000); // wait for the task to finish.
label1.Text = "test";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment