Generics with Generic Parameters and Abstract class

前端 未结 4 402
不思量自难忘°
不思量自难忘° 2020-12-03 14:03

I\'ve got two generic base classes. The second generic class has a constraint on its parameter of the first class.

abstract class FirstClass {...}
         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 15:01

    Create an interface that FirstClass implements. Then you can constrain SecondClass to the interface.

提交回复
热议问题