c# - Events: How to keep eye on List Object properties -


i have list activeacountlist of object (activeaccount).

list<activeaccount> activeacountlist = new list<activeaccount>(); 

the object/activeaccount props/info key, name, account, amount, source , more properties.

i don't own object, been owned 3rd party , using event given them, fires when ever changes or added list. below event method fires every time when added or updated , using same event populating activeacountlist

private void getaccountlist(activeaccount activeaccountdata) {     if(!activeacountlist.contains(activeaccountdata.key))     {         activeacountlist.add(activeaccountdata);     }     else     {         activeacountlist[activeaccountdata.key] = activeaccountdata;     } } 

now question is, there way can attach event fires every time when 'amount' changes? or if can keep eye on property , when ever changes event fires? keep in mind dont own object can not thing activeaccount class.

this solution should work. please check link


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -