C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
C# Main Thread ExampleThe first thread which is created inside a process is called Main thread. It starts first and ends at last. Let's see an example of Main thread in C#. using System; using System.Threading; public class ThreadExample { public static void Main(string[] args) { Thread t = Thread.CurrentThread; t.Name = "MainThread"; Console.WriteLine(t.Name); } } Output: MainThread
Next TopicC# Threading Example
|