How to exclude nonserializable observers from a [Serializable] INotifyPropertyChanged implementor?
I have almost a hundred of entity classes looking like that: [Serializable] public class SampleEntity : INotifyPropertyChanged { private string name; public string Name { get { return this.name; } set { this.name = value; FirePropertyChanged("Name"); } } [field:NonSerialized] public event PropertyChangedEventHandler PropertyChanged; private void FirePropertyChanged(string propertyName) { if (this.PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } Notice the [field:NonSerialized] attribute on PropertyChanged . This is necessary as some of the