title: BackgroundWorker with anonymous methods?
body: <p>I'm gonna create a <strong>BackgroundWorker</strong> with an anonymous method.<br />
  I've written the following code :<br /><br /></p>
  
  <pre><code>BackgroundWorker bgw = new BackgroundWorker();
  bgw.DoWork += new DoWorkEventHandler(
      () =&gt;
      {
          int i = 0;
          foreach (var item in query2)
          {
              ....
              ....
          }
      }
  );
  </code></pre>
  
  <p><br /></p>
  
  <p>But <strong><em>Delegate 'System.ComponentModel.DoWorkEventHandler' does not take '0' arguments</em></strong> and I have to pass two objects to the anonymous method : <strong>object sender, DoWorkEventArgs e</strong></p>
  
  <p>Could you please guide me, how I can do it ?
  Thanks.</p>