That's what interface inheritance means; if you fulfill the contract of the more derived type then you are required to also fulfill the contract of the less derived type.
接口继承就是这样的;如果你要满足派生程度较高的类型的契约的话,你就必须要满足派生程度较低的类型。
A contravariant delegate can be assigned another delegate of the same type, but with a less derived generic type parameter.
可以向逆变委托分配同一类型的其他委托,但需使用派生程度较小的泛型类型参数。
An interface that has a contravariant type parameter allows its methods to accept arguments of less derived types than those specified by the interface type parameter.
如果接口具有逆变类型形参,则允许其方法接受与接口类型形参指定的派生类型相比,派生程度更小的类型的实参。
Similarly, Li Songsong's approach to painting in many ways is less derived from traditional oil painting but instead from conceptual and new media theories of reproduction and representation.
也因此李松松的绘画手法,很多方面看来都和传统油画不同,而是受到「再制」和「再现」等概念,以及新媒体时代的理论所影响。
Is a class (or struct) that implements a more-derived interface also required to state in its base type list that it is implementing all of those less-derived interfaces?
一个实现了派生程度较高的接口的class或者struct必须要在其基类型列表中声明它实现了那些派生程度较低的接口吗?
So it's optional whether the less-derived implemented interfaces are stated in the base type list?
那么就是说派生程度较低的接口是否被声明在基类列表中是可选的了?
So it's optional whether the less-derived implemented interfaces are stated in the base type list?
那么就是说派生程度较低的接口是否被声明在基类列表中是可选的了?
应用推荐