In addition to correct Answer by Albin and in response to partially correct Answer by Abhinav:
Standard event handling requires event arguments to be
delegate EventDelegateType(object sender, EventArgumentType eventArgs);
where
EventArgumentType
is derived from
System.EventArgs
; in this case the event itself is to be declared as
System.EventHandler
(one type is generic with generic type parameter of
System.EventArgs
or derived) or a base
EventHandler
.
Only this type will pass the check by FxCop.
In this standard schema, even the event handler cannot return value. Modification of event argument is very important and in certain sense carry "return" functionality, but it is not the return, technically.
What happens if we neglect this standard recommendation and create a custom event type with return value?
It won't be very helpful. The event invocation ignored return values. Why? Just to keep things more simple. In the multi-cast situation (which is usual for event; everyone can add another handler to the same event), there are several different returns. What do to with that? Microsoft decided to ignore them.
Just for events! For delegate instances, anyone can get
Delegate.GetInvocationList
, get all the return values and do something different. I practice this for certain situations.
--SA