How to track if (List <T>) collection is changing?

I have a custom collection derived from List (.MyItem.)

I want to track if my collection has changed, how can I do this?

I can track Add Remove operations, etc. by implementing a new definition, but I don't see any method on List that gives me the ability to track collection changes ...

+3
source share
1 answer

Take a look at a new type called ObservableCollection <T> . He created a notification of changes, and it’s quite simple to change his base class to this from the list, since both of them are very similar.

+9
source

Source: https://habr.com/ru/post/1721365/


All Articles