The work to be done and run in a new thread is programmed in the
DoWork event handler. To understand how it works, the best we can do is to see it in action and experience the difference between the code running in the same thread (the application's main thread) and in another thread.
Imagine that we must create a Codebreaker Application. There is a code of four Unicode characters, and we want to break it by a brute force attack. Therefore, we must loop through each Unicode character until we have a match, then move on to the next character and so on.
However, as the application will take some time to break the code, we do not want to get caught by a guard during the hacking process. Therefore, ...