使用INotifyPropertyChanged时指定属性名称的最佳方法是什么?
大多数示例将属性名称硬编码为PropertyChanged事件的参数.我在考虑使用MethodBase.GetCurrentMethod.Name.Substring(4),但对反射开销有点不安.
.net reflection wpf
.net ×1
reflection ×1
wpf ×1