如果接口继承另一个接口 [英] if an interface inherits another
本文介绍了如果接口继承另一个接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
frends,我有非常基本的疑问请清楚。
如果一个接口继承了另一个包含一个方法的接口。
编译器没有要求实现第二个界面为什么。
或
接口 IInterface222
{
void GetData();
}
public interface IInterface23:IInterface222
{
}
为什么不允许执行。
我知道接口不包含定义这只是背后的原因吗? a
解决方案
因为IInterface222
实现完成IInterface23
实施太
frends , i had very basic doubt please clear.
if an interface inherits another interface which contain one method.
compiler not asking to implement second interface why.
or
interface IInterface222
{
void GetData();
}
public interface IInterface23 : IInterface222
{
}
why this is allowing with out implementing.
iam aware that interfaces does not contain the definitions this is only reason behind? a
解决方案
BecauseIInterface222
implementation accomplishesIInterface23
implementation too.
这篇关于如果接口继承另一个接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文