16.2. Creating Threads Using the System.Threading.Thread Class

In C# you create a thread by using the Thread class and the ThreadStart delegate. A delegate is a C# construct that is essentially a reference to a function. This reference can be treated like a regular object reference. For example, the delegate defined in the following code says that you can create a reference to a function whose signature is similar to that of the CalcIncome method:

Table 16.3. System.Threading Enumerations
ApartmentStateSpecifies the apartment state of a thread. An apartment is a logical container within a process for objects sharing the same thread access requirements. All objects in the same apartment can receive calls from any thread in ...

Get .NET for Java Developers: Migrating to C# 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.