Created
October 22, 2013 11:08
-
-
Save brunomikoski/7098772 to your computer and use it in GitHub Desktop.
Delega example C#
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
//C# Delegate: | |
public delegate [return] DelegateName([type parameter]...); | |
//Sample: | |
public delegate void CalbackHandler(int pIndex); | |
//So you can use it as a parameter to other method: | |
public void PassDelegateByParameter( CallbackHandler pHandler ) | |
{ | |
pHandler( 1 ); // it will invoke pHandler delegate. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment