Background Worker Class in C#

As the name suggests the Background Worker Class allows you to set a thread continuously running in the background and communicating with the main thread whenever required.

BackgroundWorker makes the implementation of threads in Windows Forms. Intensive tasks need to be done on another thread so the UI does not freeze. It is necessary to post messages and update the user interface when the task is done. 

The following properties are used in BackgroundWorker class:

Reference: Microsoft Developer Network (MSDN)

S.No.Name & Description
A value indicating whether the application has requested cancellation of a background operation.
Gets a value indicating whether the component can raise an event
Gets the IContainer that contains the Component.
Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Gets the list of event handlers that are attached to this Component.
Gets a value indicating whether the BackgroundWorker is running an asynchronous operation.
Gets or sets the ISite of the Component.
Gets or sets a value indicating whether the BackgroundWorker can report progress updates.
Gets or sets a value indicating whether the BackgroundWorker supports asynchronous cancellation.

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 19-Jun-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started