Skip to content

Instantly share code, notes, and snippets.

@tnngo2
Created May 3, 2012 16:21
Show Gist options
  • Save tnngo2/2586945 to your computer and use it in GitHub Desktop.
Save tnngo2/2586945 to your computer and use it in GitHub Desktop.
using System;
namespace Theory_9
{
class MultipleAnonymousMethods
{
private delegate void Display();
static void Main(string[] args)
{
Display objDisplay = delegate
{
Console.WriteLine("Call delegate 1");
};
objDisplay += delegate
{
Console.WriteLine("Call delegate 2");
};
objDisplay();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment