c# - How can I to check a property will be renewed or its value will be changed -
how can check property renewed or value changed.
public myclass {    get{}     set       {           // find if programmer set a=new myclass();        } }      
it's not clear want exactly, maybe this:
myclass _a; public myclass {     { return _a; }     set     {         // find if programmer set a=new myclass();         if (value != _a)         {             // different value         }     } }   for more complex scenario follow suggestion of raphaƫl althaus , take @ inotifypropertychanged.
Comments
Post a Comment