问题
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