How to do proper Reflection of base Interface methods

后端 未结 3 1620
耶瑟儿~
耶瑟儿~ 2020-12-18 21:33

I have 2 interfaces and 2 classes that I investigate via Reflection:

  • IParent
  • IChild - derives from IParent
  • Parent
  • Child - derives f
3条回答
  •  渐次进展
    2020-12-18 22:25

    Although, we use the interfaces as the same way we use inheritance (":"); interfaces are not inherited; they are to be implemented. In such a case; inheritance is confused with implementation since they are defined using the same operator (":").

    As a summary; IA : IB and A:IA means; any class implementing IA, shall implement IB. In this case; A shall implement IA and IB.

    A:B means A class inherits B class; it does not implement.

    The confusion here derives from using the same operator (":").

    Check this page interface inheritance

提交回复
热议问题