sta thread c# code example
Example 1: 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
Example 2: thread c#
using System.Threading;