Skip to content

Dev Notes

Joshua Behler edited this page Jun 12, 2025 · 1 revision

This is a collection of various development notes to keep in mind while developing.

Usage of C# Timers

Keep timer usage to a minimum and where appropriate.

If you are doing work on a GUI object and require a worker thread to modify that object, it is possible to delegate an function to perform the update task. The example below shows that the GUI (in this case form object "this") can be told to invoke a method on the object so that the Location of the form (as an X Y point) can be updated from a worker thread.

 // Update the Form Location
this.Invoke((MethodInvoker)delegate
{
    Location = newPos;
});

Clone this wiki locally