C#线程编程
独立线程的运行和控制:
const int Repetitions = 1000; public static void ThreadStart() { System.Threading.Thread thread = new System.Threading.Thread(DoWork); thread.Start(); for (int count = 0; count < Repetitions; count++) { Console.Write('-'); } thread.Join(); } private static void DoWork() { for (int count = 0; count < Repetitions; count++) { Console.Write('.'); } }向线程传递参数:
const int Repetitions [...]
浙公网安备 33010602011771号