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 - Using lists for thread creation on the fly II

Wow, another cappuccino! Gracefulness or impatience? Never mind. Let's finish the application, and they will be very happy with you.

Now, we must rewrite some procedures and events. It is going to be easier rewriting these than making the changes, as we are replacing single variables by lists. In order to accomplish this, we must create a thread with a parameter indicating its number:

  1. Open the project, SMSEncryption.
  2. Replace the definition for ThreadEncryptProcedure with the following (now it receives a parameter):
    private void ThreadEncryptProcedure(object poThreadParameter)
    
  3. Replace the code in the ThreadEncryptProcedure procedure with the following:
    string lsEncryptedText; // Retrieve ...

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