what is the difference between raisepropertychanged and PropertyChanged?

后端 未结 1 1193
孤城傲影
孤城傲影 2021-02-20 06:15

i think both are same,but i found use of them in only one file such as below code.here code for raisepropertychanged .

public decimal Amount
        {
               


        
1条回答
  •  孤城傲影
    2021-02-20 06:49

    PropertyChanged is an event. RaisePropertyChanged is the method used to raise the event.

    Of course, you could invoke the event directly from your property setter, but then you would have to check every time if the handler is not null... better to do it in one place.

    0 讨论(0)
提交回复
热议问题