Has probado de este modo?
Action<object, CancelEventArgs> closingEventHandler = (s, e) => {
// tu código
e.Cancel = true;
};
this.Closing += closingEventHandler ;
// mas adelante...
this.Closing -= closingEventHandler;
Has probado de este modo?
Action<object, CancelEventArgs> closingEventHandler = (s, e) => {
// tu código
e.Cancel = true;
};
this.Closing += closingEventHandler ;
// mas adelante...
this.Closing -= closingEventHandler;