日期:2014-05-17 浏览次数:20902 次
public class Work
{
Timer timer = new Timer();
string str;
public Work()
{
Start();
}
public string Find()
{
str = "str";
return str;
}
public void Start()
{
timer.Interval = 100;
timer.Enabled = true;
timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
timer.Start();
}
void timer_Elapsed(object sender, ElapsedEventArgs e)
{
Find();
}
}