Monday 19th August at 6 for 6:15pm start.
At this meeting, Lachlan Gemmell gave a remote presentation on Anonymous Methods.
He showed the syntax for method references, which is required to create references to anonymous methods, and can also refer to named methods, procedures and functions.
In his first example; he created a method that did initialization and finalization in a try-finally statement. The method had a method reference parameter, to be run between the initialization and finalization. He called the method passing an anonymous method as the argument.
This technique can eliminate repetition of initialization and finalization code.
In his second example, he passed an anonymous method that manipulated a single control to a method that called the passed method for every control on a form.
Then he showed two examples where the anonymous method captured a local variable. He created a queue of method references, where the captured variables recorded information from when the anonymous method was created.
In one example, the method references were each to be executed in order after a delay.
In the other, he used the same technique to implement an undo function for a simple calculator.
Links to more information can be found at
Some of the links shown are no longer valid, but they can still be accessed using the WayBack machine at https://archive.org/
We started the meeting with a “Public Soap Box” with discussion on various topics.
The meeting was held at the Melbourne Men’s Shed, situated in the Federation Square Car Park building, off Russell St Extension.