的例子是这样的:如何实现一个已经有一些其他接口的接口?
interface IA
{
ICollection<IB> Bs {get;set;}
}
interface IB
{
}
public class BBase : IB
{
}
public class ABase : IA
{
public ICollection<BBase> Bs { get; set; }
}
的问题是,当我想实现的接口IA
与BBase
,就像我在ABase
一样,发生错误。是说我只能用IB
而不是BBase
来执行IA
的ABase
?
+1 - 可接受的有用方法。将接口签名更改为通用可能无法在所有情况下使用。 – 2013-02-28 07:28:10
@AlexeiLevenkov同意..在这种情况下,在我看来,OP只是开始设计 – horgh 2013-02-28 07:33:11
非常感谢! – user2118486 2013-02-28 07:42:48