How do I override List's Add method in C#?

后端 未结 10 1312
名媛妹妹
名媛妹妹 2020-11-27 18:59

I am currently looking to make my own collection, which would be just like a regular list, except that it would only hold 10 items. If an item was added when there were alre

10条回答
  •  时光说笑
    2020-11-27 19:22

    You could take a look at the C5 collection library. They have an ArrayList that implements IList and have a virtual Add method. The C5 collection library is an awesome collection of lists, queues, stacks etc... You can find the C5 library here:

    http://www.itu.dk/research/c5/

提交回复
热议问题