References Inheritance in C#

可紊 提交于 2019-12-22 15:04:20

问题


I have the following problem:

I have interfaces IA in the ProjectA.dll and IB in the ProjectB.dll (IB inherits IA). When I try to implement IB in any another project the both references are required. Well, the requirement of a reference on the ProjectB.dll is expected, but I was little bit confused, that a reference on the ProjectA.dll is needed too.

Does anybody know how is this feature called and where can I find detailed information about this behavior?


回答1:


You'll need a reference to all of the assemblies that contain the classes involved in any interface you might implement. Otherwise, how will the runtime know what the definition of any such class is?



来源:https://stackoverflow.com/questions/13472145/references-inheritance-in-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!