We go over frequent slip-ups when working with events and delegates: double subscription (
+=), forgotten unsubscription (
-=,
IDisposable), exceptions in handlers and iterating via
GetInvocationList(), modifying subscriptions during broadcast, calls when
null and safe
?.Invoke, correct signatures
EventHandler/
EventHandler<T>, invoking only via
OnEventName, careful
add/
remove accessors, traps with
static events, closures in lambdas and the weak event pattern. Plus recommendations on naming and standard signatures.