O'Reilly logo

Pro Silverlight 5 in VB by Matthew MacDonald

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

The Thread Class

The most straightforward way to create a multithreaded Silverlight application is to use the Thread class from the System.Threading namespace. Each Thread object represents a separate thread of execution.

To use the Thread class, you begin by creating a new Thread object, at which point you supply a delegate to the method you want to invoke asynchronously. A Thread object can point to only a single method. This signature of this method is limited in several ways. It can't have a return value, and it must have either no parameters (in which case it matches the ThreadStart delegate) or a single object parameter (in which case it matches the ParameterizedThreadStart delegate).

For example, if you have a method like this:

Private ...

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