Is there a C# / Windows Forms equivalent to Android’s runOnUiThread?
For example, say I am running a (long-running) task on a worker thread and at the end I want to post the result to a GUI control (which of course I can’t do from the worker thread). Is there a function as simple as runOnUiThread that would allow me to post that refresh-display for processing by the UI thread?
Each control in WinForms inherits the
InvokeandBeginInvokemethods.Invoke will run the delegate synchronously whereas BeginInvoke runs it asynchronously.