var changed = false;
a.PropertyChanged += (sender, e) => changed = true;
....
a.PropertyChanged -= (sender, e) => changed = true;
if(changed)
....
//This one works:
var changed = false;
PropertyChangedEventHandler onchange = delegate { changed = true; };
a.PropertyChanged += onchange;
...
a.PropertyChanged -= onchange;
if(changed)
...