我为“DoEvents”方法找到了这两个实现:
解决方案 1:
System.Windows.Application.Current.Dispatcher.Invoke(
System.Windows.Threading.DispatcherPriority.Background,
new System.Threading.ThreadStart(() => { }));
解决方案 2:
System.Windows.Application.Current.Dispatcher.Invoke(
System.Windows.Threading.DispatcherPriority.Background,
new System.Action(delegate { }));
你能解释一下这两种实现有什么区别,什么是最适合使用的?
谢谢。