This file contains hidden or 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
// matchingMethod1 matches myDelegate delegate | |
public return-type matchingMethod1(<ParameterList>) { ... } | |
// matchingMethod2 matches myDelegate delegate | |
public return-type matchingMethod2(<ParameterList>) { ... } | |
// askPolitely matches responseBehaviour delegate | |
public void askPolitely(Person borrower) { | |
borrower.say("Y-- Excuse me. You-- I believe you have my stapler?"); | |
} |
This file contains hidden or 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
// Generic example | |
public delegate return-type myDelegate(<ParameterList>); | |
// Concrete example | |
public delegate void responseBehaviour(Person borrower); |
NewerOlder