I have an abstract base class that has a Property that I would like to prevent hiding, as well as new, and overriding.
public abstract class DomainObject
{
public bool IsDeleted { get; set; }
}
public class BankAccount : DomainObject
{
public bool IsDeleted { get; set; }
}
The problem is this: I need BankAccount to inherit from the DomainObject base class, so I cannot mark it as sealed, but I want to prevent the situation, override or new, IsDeleted at compile time.
source
share