title: BackgroundWorker alternatives for Windows Forms
body: <p>Is it possible to do something like this in a Windows Forms app?</p>
  
  <p>I'm trying to find other ways of updating the UI instead of using the BackgroundWorker all the time. Maybe something like this?:</p>
  
  <pre><code>public List&lt;String&gt; results = new List&lt;String&gt;();
  
  private void button1_Click(object sender, EventArgs e)
  {
      When(SomeLongRunningMethod("get") == true)
      {
          // LongRunningMethod has completed.
          // display results on Form.
          foreach(string result in results)
          {
              this.Controls.Add(new Label() { Text = result; Location = new Point(5, (5 * DateTime.Now.Millisecond)); });
          }
      }
  }
  
  public void SomeLongRunningMethod(string value)
  {
      if(value == "get")
      {
          // Do work.
          results.Add("blah");
      }
  }
  </code></pre>
  
  <p>The above basically says, "Do <em>this</em> and when you're done, add the results to the form."</p>