-
-
Save noakesey/3838c12000bf3fca7a0698900d0eba64 to your computer and use it in GitHub Desktop.
Define a delegate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void myMethod() | |
{ | |
EventHandlerResult result = new EventHandlerResult(); | |
this.nydelegate(1, 2, result); | |
var total = result.result(); | |
} | |
delegate void myDelegate(real parm1, real parm2, EventHandlerResult result) | |
{ | |
//Must be protected, void and empty! | |
//Add an EventHandlerResult to allow the subscriber to return a value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment