Skip to content

Instantly share code, notes, and snippets.

@noakesey
Last active December 14, 2018 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noakesey/3838c12000bf3fca7a0698900d0eba64 to your computer and use it in GitHub Desktop.
Save noakesey/3838c12000bf3fca7a0698900d0eba64 to your computer and use it in GitHub Desktop.
Define a delegate
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