I am currently using the System.Timers.Timer class to call an 'OnTimer' method 20 times per second. This method then makes calls into the rest of the application.
Unfortunatley, because of the way the Timer class works, the 'OnTimer' method is executed on a different thread, but this then calls other methods in the application which are not thread-safe.
Is there any way I can cause the Ontimer method to trigger an event (or equivalent) in the same thread that the rest of the application is running in? This would obviously be far simpler than attempting to make everything else threadsafe!
Any help would be much appreciated,