Summary of the tutorialA delegate is a way to encapsulate a reference to a method inside a object. The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked. This means you can kind of treat a method like a variable by using delegates.
We'll explore this by creating a simple gump that has 2 options an Okay, and a Cancel button, a string for a title and a string for a message. We'll use a delegate void for processing the option (in the form of a bool) that the user selects.
Page 1 of 3