-1

I want to create my own class that inherit from ArrayList. (I want to add some functionality that I need to the ArrayList)

I want my MyArrayList to still be geneirc, means - MyArrayList.

How can I do that?

thanks

user1439691
  • 381
  • 1
  • 6
  • 17

2 Answers2

2

IF you want generic list than its better to make use of List<T>.

And to add extra function you can make use of extension methods

Pranay Rana
  • 175,020
  • 35
  • 237
  • 263
1

ArrayList is already generic by its defininition, as it's an array of objects.

There is nothing more generic then object in CLR.

If you mean Generics (<T>), just use List<T>.

Tigran
  • 61,654
  • 8
  • 86
  • 123