Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC#events and observer patternSingle-choice MCQ

Why does the standard event pattern recommend copying the handler to a local variable before invoking, as shown?

var handler = SomethingHappened; if (handler != null) handler(this, EventArgs.Empty);