尔冬橙

博客园 首页 新随笔 联系 订阅 管理

2013年2月4日 #

摘要: 在线程中,如果要暂停一定的时间,可以使用Thread的Sleep方法,让线程暂停。在微软新的win8API中,已经用Task来实现原来用线程实现的许多功能,同样,Task也有Delay方法,让程序暂停一定的时间。以下程序利用System.Threading.Timer让程序每隔间隔的时间执行回调方法:using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace TimerApp{ class Program { static void M... 阅读全文
posted @ 2013-02-04 22:32 尔冬橙 阅读(10357) 评论(0) 推荐(0) 编辑