New threads can be started using the Task Programming Library in .NET in – at last – 5 different ways.
You’ll first need to add the following using statement:
The most direct way
…where PrintMessage is a method:
Using a delegate
Lambda and named method
Lambda and anonymous method
Using Task.Run in .NET4.5
Using Task.FromResult in .NET4.5 to return a result from a Task
You cannot start a task that has already completed. If you need to run the same task you’ll need to initialise it again.
View the list of posts on the Task Parallel Library here.