I have this as one of my members of the class \'KeyEvent\':
private delegate void eventmethod();
And the constructor:
publi
You pretty much have the code already. Just create a member field of the right delegate type and save the parameter to it just like you would with any other data type.
private eventmethod MySavedEvent;
public void KeyEvent(eventmethod D) {
// Save the delegate
MySavedEvent = D;
}
public void CallSavedEvent() {
if (MySavedEvent != null) {
MySavedEvent();
}
}