INotifyPropertyChanged property name - hardcode vs reflection?

前端 未结 16 1628
感动是毒
感动是毒 2020-11-28 05:13

What is the best way to specify a property name when using INotifyPropertyChanged?

Most examples hardcode the property name as an argument on the PropertyChanged E

16条回答
  •  广开言路
    2020-11-28 05:25

    Yeah I see the use and simplicity of the function you are suggesting, but when considering the running cost due to reflection, yeah that is a bad idea, What I use for this scenario is having a Code snippet added properly to take advantage of the time and error in writing a property with all the Notifyproperty event firing.

提交回复
热议问题