run code in new thread c# code example
Example 1: c# create new thread
using System.Threading;
Thread thread = new Thread(new ThreadStart(WorkThreadFunction));
thread.Start();
Example 2: new thread c#
using System.Threading;
//creating and running a void in a new thread
Thread t = new Thread(new ThreadStart(task)); //task is the void
t.Start(); //starting the thread