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

In the standard event pattern, why is the conventional protected virtual OnSomething method recommended over having derived classes raise the event directly?

protected virtual void OnDataChanged(EventArgs e) { DataChanged?.Invoke(this, e); }