title: How do i call an async method from a winforms button click event?
body: <p>I have an I/O bound method that I want to run asynchronously.</p>
  
  <p>In <a href="https://docs.microsoft.com/en-us/dotnet/csharp/async" rel="noreferrer">the help docs</a> it mentions that I should use async and await without Task.Run</p>
  
  <p>to quote</p>
  
  <blockquote>
    <p>For I/O-bound code, you await an operation which returns a Task or
    Task inside of an async method.</p>
  </blockquote>
  
  <p>How do I do this from a winforms button click event?</p>
  
  <p>I have tried</p>
  
  <pre><code>private void button_Click(object sender, EventArgs e)
  { 
        await doLoadJob();
  }
  
  private async Task&lt;int&gt; doLoadJob()
  {
      await loadJob();   
      return 0;
  }
  </code></pre>