It s declaring a field-like event, of type ChangedEventhandler
, called Changed
. Basically it s roughly equivalent to:
private ChangedEventHandler changedHandler;
public event ChangedEventHandler Changed
{
add
{
lock(this)
{
changedHandler += value;
}
}
remove
{
lock(this)
{
changedHandler -= value;
}
}
}
In other words, it creates an event which clients can subscribe to and unsubscribe from, and a variable to store those subscriptions. The event subscription/unsubscription code just combines/removes the given handler with the existing ones and stores the result in the field.
The result is that clients can subscribe to the event, e.g.
foo.Changed += ...;
and then when you raise the event, all the handlers are called.
See my article on events and delegates for more information.