您应该使用System.Threading.Timer:
private System.Threading.Timer timer;
public YourClass()
{
timer = new System.Threading.Timer(UpdateProperty, null, 1000, 1000);
}
private void UpdateProperty(object state)
{
lock(this)
{
// Update property here.
}
}
Run Code Online (Sandbox Code Playgroud)
记得在读取属性时锁定实例,因为UpdateProperty是在另一个线程中调用的(ThreadPool线程)