In the following code, compiler complains about B not implementing TestProperty
of abstract class A
. ITest2
is derived from ITest1
so it implements everything ITest1
has. Why is this not possible?
public interface ITest1 { }
public interface ITest2 : ITest1 { }
public abstract class A
{
public abstract ITest1 TestProperty { get; set; }
}
public class B:A
{
public override ITest2 TestProperty { get; set; }
}