Basic Operations with Threads
If the concept of a thread is still not clear to you, our next discussion on programming basic thread operations with Visual Basic .NET will likely cement the concept in your mind.
Starting and Stopping Threads
Our exploration of the System.Threading namespace will start with the Thread class and its capability to create, start, and stop new threads.
The Thread class is the primary worker class in the System.Threading namespace. It is a sealed, non-inheritable class. To create a thread and start executing some code on it, you have to understand the Thread class constructor and the Start method. First, a quick glance at the constructor. It is defined like this:
Public Sub New(ByVal start As ThreadStart)
The ThreadStart ...
Get Visual Basic® Programmer's Guide to the .NET Framework Class Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.