Return a value from an Event — is there a Good Practice for this?

It’s often awkward to return values from events. In practice, I’ve found it much easier to include a writable property on a set of custom EventArgs that is passed to the event, and then checked after the event fires — similar to Cancel property of the WinForms FormClosing event.

Leave a Comment