System.ComponentModel.BackgroundWorker

Overview 

  • Executes an operation on a separate, dedicated thread.
  • Good for long running operations such as download and database transactions.

Implementation

  • Implement operations in the DoWork event hanlder
  • Call RunWorkerAsync to start the operation
  • Receive notifications (update UI etc)  in the ProgressChanged event handler
  • Pass parameter to RunWorkerAsync and retrieve within DoWork event handler via DoWorkEventArgs.Arugument property
This entry was posted in c#. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.