Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Winforms 应用程序,我想在其中每 5 分钟运行一次后台工作进程。我正在使用.Net 4.0。
'BackgoundWorker' 组件可以做到这一点吗?
你可以使用 C# 定时器--->
DispatcherTimer dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); TimeSpan interval = TimeSpan.FromMinutes(5); dispatcherTimer.Interval = interval; dispatcherTimer.Start();