С#. Foreground and Background threads

Foreground and background threads.

If background thread then application will not wait until it is over, in other case it will.

        static void Main(string[] args)
           var otherThread = new Thread(ThreadWorker);
           otherThread.IsBackground = false; // by default it is false

        private static void ThreadWorker()
            Console.WriteLine("inside other thread");
This entry was posted in Без рубрики. Bookmark the permalink.