I have a list activeAcountList
of object
(ActiveAccount
).
List<ActiveAccount> activeAcountList = new List<ActiveAccount>();
The object/ActiveAccount some props/info are Key, Name, Account, Amount, Source and some more properties.
I don't own this object, its been owned by a 3rd party and i am using an event given by them, that fires when ever
something changes or added to the list. Below is the event method that get fires every time when something added or
updated and i am using same event for populating my activeAcountList
Private void GetAccountList(ActiveAccount activeAccountData)
{
if(!activeAcountList.Contains(activeAccountData.Key))
{
activeAcountList.Add(activeAccountData);
}
else
{
activeAcountList[activeAccountData.Key] = activeAccountData;
}
}
Now my question is, is there any way i can attach an event that fires every time when 'Amount' changes? Or if i can keep eye on any property and when ever it changes this event fires? Just keep in mind i dont own this object so i can not do any thing with ActiveAccount class.