[RESOLVED] Inheriting an ArrayList
I'm trying to make my own collection based off the ArrayList class and I got a question.
If someone references a specific item in my ArrayList class, I want to do something to the Object. In C++ I'd probably overload the [] operator, modify the object and then return it(like what would normally hapen).
Re: Inheriting an ArrayList
Don't inherit the ArrayList class. The CollectionBase class exists solely as a base class for your own strongly-typed collections. Use that instead. You would basically provide the same members as the ArrayList class but strongly-typed to the type of your choice. Internally CollectionBase maintains an ArrayList, so your members call the corresponding members of the InnerList or List property. You are then basically wrapping an ArrayList rather than inheriting the class.
Re: Inheriting an ArrayList