using System;
using System.Threading;
namespace C17_4
{
public class Test
{
public static void ThreadA()
{
for (int i = 0; i < 3; i++)
{
Console.WriteLine("執行緒:{0}",i);
Thread.Sleep(50);
}
}
public static void Main()
{
Console.WriteLine("開始啟動執行緒:");
Thread a = new Thread(new ThreadStart(ThreadA));
Thread b = new Thread(new ThreadStart(ThreadA));
a.Start();
b.Start();
}
}
}
沒有留言:
張貼留言