本帖最后由 黑马王亚男 于 2012-11-25 16:20 编辑
- private static void thread1()
- {
- for (int i = 1; i <= 25; i++)
- {
- Console.WriteLine("{0}", i);
- if (i == 15)
- System.Threading.Thread.Sleep(1000);
- }
- }
- private static void thread2()
- {
- for (int i = 26; i <= 75; i++)
- {
- Console.WriteLine("{0}", i);
- if (i == 49)
- System.Threading.Thread.Sleep(5000);
- }
- }
复制代码 |