C# Language Creating and Starting a Second Thread


If you're doing multiple long calculations, you can run them at the same time on different threads on your computer. To do this, we make a new Thread and have it point to a different method.

using System.Threading;

class MainClass {
    static void Main() {
        var thread = new Thread(Secondary);

    static void Secondary() {
        System.Console.WriteLine("Hello World!");