public class Base {
public abstract int Count { get; }
}
public class Derived : Base {
// #1
public override int Count { get; set; } // CS0546: Cannot override because no 'set' accessor
// #2
// CS0106: The 'override' modifier is not valid for this item
// CS0538: 'Base' in explicit implementation is not an interface
override Base.Count => Count;
public new int Count { get; set; }
}
public class Base {
public abstract int Count { get; }
}
public class Derived : Base {
// #1
public override int Count { get; set; } // CS0546: Cannot override because no 'set' accessor
// #2
// CS0106: The 'override' modifier is not valid for this item
// CS0538: 'Base' in explicit implementation is not an interface
override Base.Count => Count;
public new int Count { get; set; }
}