title: Using async to sleep in a thread without freezing
body: <p>So I a label here (""). When the button (button1) is clicked, the label text turns into "Test". After 2 seconds, the text is set back into "". I made this work with a timer (which has an interval of 2000):</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      label1.Text = "Test";
      timer.Enabled = true;
  }
  
  private void timer_Tick(object sender, EventArgs e)
  {
      label1.Text = "";
  }
  </code></pre>
  
  <p>This works; however though, I am curious about making it work in an async method.</p>
  
  <p>My code looks like this currently:</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      label1.Text = "Test";
      MyAsyncMethod();
  }
  
  public async Task MyAsyncMethod()
  {
      await Task.Delay(2000);
      label1.Text = "";
  }
  </code></pre>
  
  <p>This doesn't work though.</p>