I want to start a BackgroundWorker
after another one is completed. I'm not sure on how to write the code for it, so I don't really have anything to show.
I thought about writing it in the RunWorkerCompleted
, but that seems like the wrong place to put logic for starting another worker.
Where and how should I do this?
Basically, I want to use the same worker, but to do something else. Like in step 1 it parses data from files and in step 2, after step 1 is completed, it should write the parsed data from memory to the database.
You can instead use the .NET 4.0 Task class and then queue more work using Task.ContinueWith.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With