O'Reilly logo

C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - Working with parameters and results

Suppose that you have to define the number of Unicode characters that the code breaking process must use in the decoding process. A spy told you that using Unicode characters greater than 32,000 was not allowed. The process can run faster, and you can avoid the guards and the wireless spies.

We want to define the number of Unicode characters that the application must use in the decoding loop programmed for the BackgroundWorker component. We cannot use a traditional mechanism for passing parameters because the execution starts asynchronously, and in an independent thread.

In order to accomplish this, we can use another way to call the RunWorkerAsync method by passing an Object type parameter. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required