Change the property signature as shown below:
Base class
public virtual int x { get { } }
Derived class
public override int x { get { } }
If you do not need an implementation in the base class, just use the abstract property.
Base:
public abstract int x { get; }
Derivative:
public override int x { ... }
I suggest you use the abstract property, rather than trhowing the NotImplemented exception in the getter, the abstact modifier will force all derived classes to implement this property so that you eventually find a solution that is safe for compilation.
sll Dec 09 '11 at 15:39 2011-12-09 15:39
source share