I have a my custom collection derived from List(.MyItem.)
I want to trace 开发者_如何学Cif my collection is modified, how can I do that?
I am able to track Add Remove operations etc...by implement new definition of them but I don't see any method in List that gives me opportunity to track if collection is modified...
Take a look at a new type called ObservableCollection<T>. It has built in notification of changes, and it should be fairly simple to change your base class to this from list as both are very similar.
精彩评论