I have a class that contains a list of objects. What's the best way to run some code in the class when the list is modified?
class MyManagerClass
{
ArrayList list = new ArrayList(); // will likely be a different collection class
private OnItemAddedToList(object o)
{
// how to call this?
}
private OnItemRemovedFromList(object o)
{
// how to call this?
}
}