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

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -