Is it possible to unsubscribe an anonymous method from an event?
If I subscribe to an event like this:
void MyMethod() { Console.WriteLine(\"I di
Action myDelegate = delegate(){Console.WriteLine("I did it!");}; MyEvent += myDelegate; // .... later MyEvent -= myDelegate;
Just keep a reference to the delegate around.