Why is it impossible to override a getter-only property and add a setter? [closed]
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . Why is the following C# code not allowed: public abstract class BaseClass { public abstract int Bar { get;} } public class ConcreteClass : BaseClass { public override int Bar { get { return 0; } set {} } } CS0546 \'ConcreteClass.Bar.set\': cannot override because \'BaseClass