Document
摘要: 【1】下载文件 using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Net; namespace XuanWu.Software. 阅读全文
posted @ 2016-07-13 16:54 从未被超越 阅读(1890) 评论(0) 推荐(0) 编辑
摘要: 定时器事件代码 static void Main(string[] args) { Method(); #region 定时器事件 Timer aTimer = new Timer(); aTimer.Elapsed += new ElapsedEventHandler(TimedEvent); a 阅读全文
posted @ 2016-07-13 16:23 从未被超越 阅读(12648) 评论(1) 推荐(0) 编辑
摘要: 本文实例讲述了C#多线程学习之使用定时器进行多线程的自动管理。分享给大家供大家参考。具体分析如下: Timer类:设置一个定时器,定时执行用户指定的函数。 定时器启动后,系统将自动建立一个新的线程,执行用户指定的函数。 初始化一个Timer对象: ? 1 Timer timer = new Time 阅读全文
posted @ 2016-07-13 16:22 从未被超越 阅读(878) 评论(1) 推荐(0) 编辑
摘要: run(){ while(true) { show(); if(条件) { break; } sleep(5*60*1000);//暂停5分钟 }}thread Brun(){ while(true) { time=当前时间; if(time==你设定的时间) { A a=new A(); a.ru 阅读全文
posted @ 2016-07-13 16:22 从未被超越 阅读(1254) 评论(0) 推荐(0) 编辑
摘要: 1. 文件操作 /// <summary> /// 文件读写操作 /// 为简化代码供大家学习,暂不考虑捕捉异常 /// </summary> public partial class TestIO : DevComponents.DotNetBar.Office2007Form { public 阅读全文
posted @ 2016-07-13 16:18 从未被超越 阅读(578) 评论(0) 推荐(0) 编辑
摘要: Timer 类: 设置一个定时器,定时执行用户指定的函数。定时器启动后,系统将自动建立一个新的线程,执行用户指定的函数。 using System; using System.Threading; namespace ThreadExample { class TimerExampleState { 阅读全文
posted @ 2016-07-13 16:17 从未被超越 阅读(614) 评论(0) 推荐(0) 编辑
摘要: ·关于C#中timer类 在C#里关于定时器类就有3个1.定义在System.Windows.Forms里2.定义在System.Threading.Timer类里3.定义在System.Timers.Timer类里 System.Windows.Forms.Timer是应用于WinForm中的,它 阅读全文
posted @ 2016-07-13 16:12 从未被超越 阅读(31365) 评论(2) 推荐(0) 编辑