【问题标题】:In C# What type interface implementation is this called在 C# 中,这称为什么类型的接口实现
【发布时间】:2016-10-26 14:46:48
【问题描述】:

如果 A 类实现接口 I1 B 类继承自 A

那我们是说B隐式继承了I1实现

Class A : I1

Class B : A

有什么不同吗

Class B : A, I1

【问题讨论】:

  • @YashwanthRao : Class B 继承自 I1 并实现 I1,这不是多重 ingeritence,因为在 C# 中很有可能,

标签: c# terminology


【解决方案1】:

是的,有区别。查看“接口重新实现”了解详细信息,或阅读 C# 规范的该部分。

另请参阅 https://blogs.msdn.microsoft.com/ericlippert/2011/04/04/so-many-interfaces/https://blogs.msdn.microsoft.com/ericlippert/2011/12/08/so-many-interfaces-part-two/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-04
    • 2019-03-15
    • 2011-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-29
    • 1970-01-01
    相关资源
    最近更新 更多