Implementing INotifyPropertyChanged - does a better way exist?

前端 未结 30 2612
感情败类
感情败类 2020-11-21 05:23

Microsoft should have implemented something snappy for INotifyPropertyChanged, like in the automatic properties, just specify {get; set; notify;} I

30条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-21 05:40

    If you are using dynamics in .NET 4.5 you don't need to worry about INotifyPropertyChanged.

    dynamic obj = new ExpandoObject();
    obj.Name = "John";
    

    if Name is bound to some control it just works fine.

提交回复
热议问题