I'm not very familiar with ObservableCollection but implementing it seems to provide me with a convenient way of updating a custom collections state based on any add/remove/replace/clear operation.
However, the examples I've looked at typically reference it in the context of WPF/WinForms data binding.
Does implementing it bring any unwanted overhead/dependencies that I should be wary of, ie. in my scenario (simply updating extended state which I have added to the collection based on adds/removes etc.) would it be better to just implement Collection or similar and update the extended state by overriding each add/remove/replace/clear operation?
The reason ObservableCollection is more often than not associated with UI is because of the flexibility it provides in updating the view if you are using MVVM pattern. Having said that I see no reason it should prevent you from using it in non-UI code. Please refer 1 for perfromance related information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With