In a Windows Application, when multiple threads are used, I know that it’s necessary to invoke the main thread to update GUI components. How is this done in a Console Applic
Typically it's not done in a console app. If you're trying to use a Win32 GUI API, you should really be running a message loop, I suspect.
You could call Application.Run()
or Application.Run(ApplicationContext)
from your console app to start a new message loop. The idea would be to then use SynchronizationContext.Current to marshal back to the main thread. However, I haven't managed to get that to work yet... you need to somehow force it to register its message loop as the current synchronization context, and I haven't managed to persuade it to do so :(