system.timers.timer类在运行过程中,我想查看它倒计时的当前时间,比如倒计时50秒,当前运行到33秒,请问该如何做呢!

解决方案 »

  1.   

    system.timers.timer是定时触发,并非一个倒计时工具。
    你可以让它每一秒触发一次,触发时做的动作就是秒数减一。
    int count=55;
    system.timers.timer timer=new system.timers.timer();
    timer.Interval=1000;
    timer.eclips+=delegate
    {
        count--;
        if (count==30)
           //这里就是倒计时到30秒时。
    };
    启动这个timer:
    timer.enabled=true;
      

  2.   

    int count=55; 不是等于50?