Overriding List's Add()

后端 未结 6 1963
陌清茗
陌清茗 2020-12-20 18:59

Can\'t i overload List\'s Add method ?

class ListDemo:List
 {
    public override T  Add(T value)
   {
      return base.Add(valu         


        
6条回答
  •  自闭症患者
    2020-12-20 19:24

    Deriving from List is not pointless if that is the class that gives you what you need. And all you want to do is add a couple methods, such as FindCar(Car dodge).

提交回复
热议问题