Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top