摘要: 环境:.net4.5需求:需要一个方法定时执行任务解决: System.Threading.Timer 提供以指定的时间间隔执行方法的机制。 此类不能被继承,有10多种实例化方法,满足多种情况.步骤:委托方法,注册执行1.代码主体 public class CensusdemoTask { System.Threading.Timer timer; private static int count = 1; public CensusdemoTask() { timer = new System.Threadi... 阅读全文
posted @ 2014-03-11 15:57 键盘上的考拉 阅读(1312) 评论(0) 推荐(0) 编辑