Guest User

Untitled

a guest
Oct 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public partial class Form1 : Form
  2. {
  3. public Form1()
  4. {
  5. InitializeComponent();
  6. }
  7. private async void button1_Click(object sender, EventArgs e)
  8. {
  9. await Run();
  10. }
  11. private async Task Run()
  12. {
  13. await Task.Delay(5000); // wait for the task to finish.
  14. label1.Text = "test";
  15. }
  16.  
  17. }
Add Comment
Please, Sign In to add comment