Вопрос

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

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top