How to create Threads in C#?To create a thread in C#, first create a new
ThreadStartdelegate. The delegate points to a method that will be executed by the new thread. Pass this delegate as a parameter when creating a new Thread instance. Finally, call the
Thread.Startmethod to run your method (in this case WorkThreadFunction) on background.
Remember to include
ExampleIn below example the new created thread will execute method
WorkThreadFunction(), this method will print to console.
Thread is printing a message!