Skip to content

Instantly share code, notes, and snippets.

@brunomikoski
Created October 22, 2013 11:08
Show Gist options
  • Save brunomikoski/7098772 to your computer and use it in GitHub Desktop.
Save brunomikoski/7098772 to your computer and use it in GitHub Desktop.
Delega example C#
//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