I’m hoping the answer is as simple as the question, but I need to write an event for a class that implements a SortedList.
Is there a way I can create an event handler for anytime this list changes (Add, Modify, Remove)? The Add() methods and such are not override-able.
Thanks!
No there is not. The best way to get this kind of behavior is to create a new class which wraps a
SortedList<T>, exposes a similar set of methods and has corresponding events for the methods you care about.