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
Kind of lame approach:
public class SomeClass
{
private readonly IList _eventList = new List();
...
public event Action OnDoSomething
{
add {
_eventList.Add(value);
}
remove {
_eventList.Remove(value);
}
}
}
This may not work or be the most efficient method, but should get the job done.