C#主线程

using System;using System.Threading;namespace MultithreadingApplication {class MainThreadProgram {static void Main(string[] args) {

编程学习网为您整理以下代码实例,主要实现:C#主线程,希望可以帮到各位朋友。

using System;
using System.Threading;

namespace MultithreadingApplication {

   class MainThreadProgram {

      static voID Main(string[] args) {
         Thread th = Thread.CurrentThread;
         th.name = "MainThread";
         Console.Writeline("This is {0}", th.name);
         Console.ReadKey();
      }
   }
}

本文标题为:C#主线程

基础教程推荐