c# - C# 中的引用继承

标签 c# visual-studio-2010 interface reference

我有以下问题:

我在 ProjectA.dll 中有接口(interface) IA ,在 ProjectB.dll 中有接口(interface) IB (IB 继承 IA >)。当我尝试在任何其他项目中实现 IB 时,这两个引用都是必需的。嗯,预计需要对 ProjectB.dll 进行引用,但我有点困惑,还需要对 ProjectA.dll 进行引用。

有人知道这个功能是如何称呼的吗?我在哪里可以找到有关此行为的详细信息?

最佳答案

您需要对所有程序集的引用,这些程序集包含您可能实现的任何接口(interface)中涉及的类。否则,运行时如何知道此类类的定义是什么?

关于c# - C# 中的引用继承,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13472145/

相关文章:

android - Kotlin 。接口(interface)作为参数

c# - 从自定义 header 中检索访问 token

c# - C# 如何找出两个数组中的不同元素?

c++ - 在 Visual Studio 解决方案中链接两个项目

objective-c - WatchKit 接口(interface) : Is it possible to add multiple labels in a tableView group without any of the labels being pushed to the right?

c# - 当成员已经用另一种类型实现时,为什么我必须显式实现类型对象的接口(interface)成员?

c# - Azure Active Directory 使用错误的应用程序客户端 ID

c# - 从 Office 选择中获取 HTML

visual-studio-2010 - F# "The value or constructor ... not defined"

silverlight - 如何在 Visual Studio 中更改 Silverlight 项目的默认图像位置