Why BindingList<T> RemoveItem method is protected
-
25-06-2021 - |
Question
Tell me please, why BindingList RemoveItem method is protected? What is the purpose of it? I know I can just inherit from it but the question is why one have made this protected
Solution
This is protected because BindingList<T>
is based on Collection<T>
, and RemoveItem
is intended for implementations of Collection<T>
to provide the proper, collection-specific implementation.
To use this directly, you can use the public RemoveAt method. This calls RemoveItem
internally, but is the public-facing API for removing an item by index.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow