The C# compiler seems to explicitly note all interfaces it, and its base classes implement. The CLI specs say that this is not necesary. I've seen some other compilers not emit this explicitly, and it seems to work fine. Is there any difference or reason the C# does this?
The MSIL that the C# at the bottom generates for B is:
.class private auto ansi beforefieldinit B
extends A
implements IAdvanced,
ISimple
It shouldn't need to specify ISimple, because A implements it as does IAdvanced. C# code:
interface ISimple {
int Basic { get; }
int Zero { get; }
}
interface IAdvanced : ISimple {
string Major { get; }
}
class A : ISimple {
int ISimple.Basic {
get { return 1; }
}
int ISimple.Zero {
get{ return 0;}
}
}
class B : A, IAdvanced {
string IAdvanced.Major {
get { return "B"; }
}
}