Task.Factory.StartNew(() => { Console.WriteLine("Thread.CurrentThread.IsBackground=" + Thread.CurrentThread.IsBackground); // 置为前台线程 Thread.CurrentThread.IsBackground = false; Console.WriteLine("Thread.CurrentThread.IsBackground=" + Thread.CurrentThread.IsBackground); });