Creating a new BackgroundWorker instance

suggest change

A BackgroundWorker is commonly used to perform tasks, sometimes time consuming, without blocking the UI thread.

// BackgroundWorker is part of the ComponentModel namespace.
using System.ComponentModel;

namespace BGWorkerExample 
     public partial class ExampleForm : Form 

      // the following creates an instance of the BackgroundWorker named "bgWorker"
      BackgroundWorker bgWorker = new BackgroundWorker();

      public ExampleForm() { ...

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents