The .NET Framework supports multithreaded programming in two ways:

  1. By letting you explicitly create and use threads.

  2. By letting you make asynchronous calls.

Using the class Thread, you can create a thread, abort a thread, or wait for a thread to complete. You can also adjust the properties of a thread, such as the priority and the COM apartment model.

Class Thread and all other thread-related classes are defined under the namespace System.Threading.

You can use asynchronous delegates to make asynchronous calls. In this case, .NET uses threads from a thread pool to serve your request. You can use BeginInvoke to execute a method asynchronously and optionally use EndInvoke to retrieve output parameters. The asynchronous delegates work seamlessly ...

Get .NET Programming: A Practical Guide Using C# now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.