|Description:||Code snippet for an event and the corresponding On... method|
(Update 2005–11–23: Changed to make the “On...” method thread safe. Thanks Eric!
D’oh… I even wrote about this in January, but as thread safety wasn’t an issue in any of my code, I went back to the “old pattern” at some point, as it meant less typing. But a code snippet should of course use the correct pattern, right?)