If I have a backgroundWorker that has executed like this:
If I now want to cancel this, I have put this line of code at the very last line in the _DoWork event of the backgroundWorker2.
I am not sure if that works or if it is the right way to do it.
The thing is that I use the backgroundworker for 2 things. First I will try one thing in the backgroundworker and then I will try another thing with the same backgroundworker.
So the backgroundworker needs to be "Finished" before I execute the backgroundworker again the second time.