C# code to handle different classes with same method names

前端 未结 9 1568
夕颜
夕颜 2020-12-10 01:56

Let\'s say you have two different C# classes A and B that while not deriving from the same base class do share some of the same names for methods.

9条回答
  •  心在旅途
    2020-12-10 02:54

    If the interface solution is not possible (e.g you don't have source code), another less effecient solution is to use reflection.

提交回复
热议问题