Skip to content

Instantly share code, notes, and snippets.

@rojepp
Created October 26, 2010 11:49
Show Gist options
  • Save rojepp/646766 to your computer and use it in GitHub Desktop.
Save rojepp/646766 to your computer and use it in GitHub Desktop.
Show how delegate definition matters, the following sample will rightfully not compile
class Program
{
delegate bool delA(string item);
delegate bool delB(string item);
static void Main(string[] args)
{
delA del = s => true;
callA(del);
callB(del);
}
static void callA(delA a)
{
}
static void callB(delB b)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment