Starting a thread with parameters C# with Example



Starting a thread with parameters C# with Example

using System.Threading; 
class MainClass { 
static void Main() { 
var thread = new Thread(Secondary); 
thread.Start("SecondThread"); 
} 
static void Secondary(object threadName) { 
System.Console.WriteLine("Hello World from thread: " + threadName); 
} 
} 
 

Backgroundworker, Task and Thread 
Examples 

0 Comment's

Comment Form

Submit Comment