如何正确实现一个带有自己接口成员的接口?(我的表述是否正确?)这是我的意思:
public Interface IFoo
{
string Forty { get; set; }
string Two { get; set; }
}
public Interface IBar
{
// other stuff...
IFoo Answer { get; set; }
}
public class Foo : IFoo
{
public string Forty { get; set; }
public string Two { get; set; }
}
public class Bar : IBar
{
// other stuff
public Foo Answer { get; set; } //why doesnt' this work?
}
我使用显式接口实现解决了我的问题,但我想知道是否有更好的方式?