Quote Originally Posted by Shaggy Hiker View Post
That's the exact technique I used for posting events to the UI thread in the class I referenced. I believe JMC has also suggested a different method that might be easier to use, but it can't be MUCH easier, because SynchronizationContext is about as simple as anything can be.
There's basically only three ways to do it:

1. In Windows Forms, use the Invoke or BeginInvoke method of a Control.
2. In WPF, use the Invoke or BeginInvoke method of a Dispatcher.
3. Use the Send or Post method of a SynchronizationContext.

The SynchronizationContext class is actually inherited by the WindowsFormsSynchronizationContext and DispatcherSynchronizationContext classes and it is an instance of one of those that SynchronizationContext.Current returns. Those derived classes actually use options 1 and 2 under the hood anyway, which is why SynchronizationContext is only of use in a Windows Forms or WPF app. I believe that the Current property is always Nothing in any other type of app.