Create an event to watch for a change of variable

前端 未结 6 2070
抹茶落季
抹茶落季 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:55

    Perhaps take a look at the INotifyPropertyChanged interface. You're bound to come across it's use again in future:

    MSDN: http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx

提交回复
热议问题