Clean event handler invocation with C# 6

added by Thomas Levesque
1/30/2015 3:03:27 PM

5 Kicks, 375 Views

The problem Invoking event handlers in C# has always been a bit of a pain, because an event with no subscribers is usually represented as a null reference. This leads to code like this: It's important to use the handler local variable, as if instead you access the field twice, it's possible that the last...


0 comments