Basic implementation of Background worker class
You need to import System.ComponentModel for using background worker
Then Declare a private variable
You need to create two methods for background worker's DoWork and RunWorkerCompleted events and assign them.
The below sub will be executed when the worker finishes the job
Then within your code add the below lines to start the background worker
When you call RunWorkerAsync() function, MyWorker_DoWork will be executed.
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0