{
public void STOP()
{
Console.WriteLine("stop 10 seconds......");
??????
Console.WriteLine("stop END!");
}
}
请问各位大侠,我要在"?????"处填写一段什么样的代码才行呢?
小弟初学,万望解释的傻瓜一点:)
7 个解决方案
#1
你最好开个线程,然后Sleep这个线程,要不然你的程序就会像死了一样的
#2
Console.WriteLine("stop 10 seconds......");
System.Threading.Thread.Sleep(new TimeSpan(0,0,0,10,0));
Console.WriteLine("stop END!");
Console.ReadLine();
System.Threading.Thread.Sleep(new TimeSpan(0,0,0,10,0));
Console.WriteLine("stop END!");
Console.ReadLine();
#3
不会,运行的挺好
#4
thread.sleep(10000);
#5
同上
#6
System.Threading
Console.WriteLine("stop 10 seconds......");
Thread.Sleep(10000);
Console.WriteLine("stop END!");
不太好 程序跟死了一样
你看看timer控件啊 !
#7
Thread.Sleep(10000);
#1
你最好开个线程,然后Sleep这个线程,要不然你的程序就会像死了一样的
#2
Console.WriteLine("stop 10 seconds......");
System.Threading.Thread.Sleep(new TimeSpan(0,0,0,10,0));
Console.WriteLine("stop END!");
Console.ReadLine();
System.Threading.Thread.Sleep(new TimeSpan(0,0,0,10,0));
Console.WriteLine("stop END!");
Console.ReadLine();
#3
不会,运行的挺好
#4
thread.sleep(10000);
#5
同上
#6
System.Threading
Console.WriteLine("stop 10 seconds......");
Thread.Sleep(10000);
Console.WriteLine("stop END!");
不太好 程序跟死了一样
你看看timer控件啊 !
#7
Thread.Sleep(10000);