What does the event keyword add when applied to a delegate field in a C# class?
Correct answer C. Outside code can only subscribe with += and unsubscribe with -=, not invoke or replace it
Declaring public event EventHandler Clicked; wraps the delegate so that only the declaring class can raise it or assign it directly. External subscribers can only add and remove handlers with += and -=. With a plain public delegate field, any code could invoke it or wipe out other subscribers with =. The event is typically raised with Clicked?.Invoke(this, EventArgs.Empty).
Answer checked How we write and check questions
Discussion