As we said before, EAP is a very good mechanism, which enables a programmer to create multithreaded applications easily and with much less coding. The
BackgroundWorker object is a general-purpose implementation of the EAP, and has many good features, such as the handy cancelation model, the ability to safely update another thread's UI controls, the reporting progress feature, exception forwarding, raising completion event, and more. We'll now implement our factorial example using the
BackgroundWorker class that resides in the
Make sure Visual Studio is up and running.
Now, let's create our program and explain its structure. Perform the following steps: ...