How to capture old value and new value in INotifyPropertyChanged implementation of PropertyChanged event in C#

后端 未结 4 753
[愿得一人]
[愿得一人] 2021-01-19 16:03

I need to capture old value, new value and property name in PropertyChanged event handler. The default implementation of INotifyPropertyChanged provides only name of the pro

4条回答
  •  野的像风
    2021-01-19 16:44

    You can't. Implement INotifyPropetyChanging as well. That will provide access to the old value. You can find example implementations for both interfaces in the documentation.

提交回复
热议问题