Prevent calling base class implemented interface method in the derived class C#
问题 Is it possible to implement an interface in a base class and allow calling/overriding the implemented method in the first derived class level but prevent calling it from any further derived classes? public interface IInterfaceSample { bool Test(); } public class Base: IInterfaceSample { public virtual bool Test() { return True; } } public class Sub1: Base { //I need to be able to override the Test method here public override bool Test() { return True; } } //Under a separate project: public