I want a WinForm to register the OnLoad event with another object – something like:
SomeObject.RegisterEvent(action => this.OnLoad += (o,e) => action(o,e));
Is this possible? I don’t mind creating delegates or expressions for ‘helpers’ on the ‘SomeObject’ side to do this, but I’m trying to figure out what my method signature would even look like for the RegisterEvent(...).
The RegisterEvent method would need to look like this:
Usage: