I want to react, whenever an integer value has changed. So, is there a possibility to write an own eventhandler? I need to get the old value and the new one, because I have to de-reference some events for an object in a list with the index of the old value and reference these events to the listitem with the index of the new value.
Something like this (really abstract):
value.Changed += new Eventhandler(valuechanged);
private void valuechanged(object sender, eventargs e)
{
list[e.Oldvalue] -= some eventhandler;
list[e.newValue] += some eventhanlder;
}
Thanks.