Create an event to watch for a change of variable

前端 未结 6 2072
抹茶落季
抹茶落季 2020-12-15 11:00

Let\'s just say that I have:

public Boolean booleanValue;

public bool someMethod(string value)
{
   // Do some work in here.
   return booleanValue = true;
         


        
6条回答
  •  遥遥无期
    2020-12-15 11:51

    INotifyPropertyChanged is already defined to notify if property is changed.

    Wrap your variable in property and use INotifyPropertyChanged interface.

提交回复
热议问题