C# 创建windows服务(Windows Service)并定时执行
摘要:
来源:bbwfang 网上整理并添加自己使用的心得一、创建window服务1、新建项目-->选择Windows服务。默认生成文件包括Program.cs,Service1.cs2、在Service1.cs添加如下代码:System.Timers.Timer timer1; //计时器public Service1(){InitializeComponent();System.Timers.Timer t = new System.Timers.Timer(); t.Interval =1000*15; t.Elapsed += new System.Timers.ElapsedEvent 阅读全文
posted @ 2013-08-27 15:54 美食塔 阅读(1044) 评论(0) 推荐(1)
浙公网安备 33010602011771号