I found this two implementation for "DoEvents" method:
SOLUTION 1:
System.Windows.Application.Current.Dispatcher.Invoke(
System.Windows.Threading.DispatcherPriority.Background,
new System.Threading.ThreadStart(() => { }));
SOLUTION 2:
System.Windows.Application.Current.Dispatcher.Invoke(
System.Windows.Threading.DispatcherPriority.Background,
new System.Action(delegate { }));
Could you explain what is the difference between these two implementations, and what is the most appropriate to use?
Thanks.