Skip to content
Sharp

Delegates & events · interview question

What does declaring a delegate member with the event keyword add over a public delegate field?

Multiple choiceMedium
Choose one answer
Answer and explanation

Correct answer

A. Outside code can only subscribe (+=) or unsubscribe (-=). Only the declaring class can invoke or replace it.

Why

event is an encapsulation feature: it stops other classes from wiping the invocation list (= null) or raising the event themselves.

Test yourself on Delegates & events

A free test with instant, explained results. No account needed.

Start free test
All Delegates & events questions →