Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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";
- }
- }
Add Comment
Please, Sign In to add comment