我有这样的代码:
public interface INode
{
INode Parent { get; set; }
// ......
}
public interface ISpecificNode : INode
{
new ISpecificNode Parent { get; set; }
// ......
}
public class SpecificNode : ISpecificNode
{
ISpecificNode Parent { get; set; }
// ......
}
此代码给出编译错误,因为未实现 INode.Parent。但是,我不需要重复的 Parent 属性。
我该如何解决这个问题?