,挺急的。c#中timer的用法
在线等 ,挺急的。c#中timer的用法
这段代码为什么运行不到 Tick()中啊 ,每次都是main函数运行了就结束了
------解决思路----------------------
System.Threading.Timer timer = new System.Threading.Timer(new System.Threading.TimerCallback(Tick), null,0,1000);
class Program
{
static int count = 0;
static void Main(string[] args)
{
System.Threading.Timer tmr = new System.Threading.Timer(Tick, count, 5000, 1000);
Console.ReadLine();
tmr.Dispose();
}
static void Tick(object data)
{
。。。。。。。。。。。省略
}
这段代码为什么运行不到 Tick()中啊 ,每次都是main函数运行了就结束了
------解决思路----------------------
System.Threading.Timer timer = new System.Threading.Timer(new System.Threading.TimerCallback(Tick), null,0,1000);