January 2008
Beginner
352 pages
9h 6m
English
The change to <ThreadFunc> will allow us to read the configuration file, create FileWorkerOption instances, create FileWorker instances, and then start the worker threads.
Before we read the configuration file, which is in XML, we want to add the import shown in Example 4-26 to the top of the Tutorial.vb, allowing us to directly instantiate the classes in the namespace.
Example 4-26. Adding the Xml namespace import.
Imports System.XmlWith the Xml namespace import in Example 4-26 added we can make the code changes required to utilize the new configuration file and updated <ThreadFunc> method listed in Example 4-27.
Example 4-27. Using the new <ThreadFunc> method.
Private Sub ThreadFunc() Try 'Load our Configuration File ...
Read now
Unlock full access