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

后端 未结 10 1292
名媛妹妹
名媛妹妹 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:26

    You can just write a class that implements IList that holds an internal List and write your own methods.

提交回复
热议问题