A blog about .NET development and software architecture.
I subscribed to an event with an anonymous delegate. Later I was in need for a solution to be able to unsubscribe this delegate. This is a simple solution for the problem:
public class ClassName
eventHandler = delegate
_object.MouseLeftButtonDown += eventHandler;
_object.MouseLeftButtonDown -= eventHandler;