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

In the code below, what is printed when Raise() is called?

class Pub { public event EventHandler E; public void Raise() { var handler = E; E += (s, a) => Console.Write("B"); // added after snapshot handler?.Invoke(this, EventArgs.Empty); } } // elsewhere, before Raise(): // pub.E += (s, a) => Console.Write("A");