I have a requirement where I have a number of classes all derived from a single base class. The base class contains lists of child classes also derived from the same base c
You can use the 'new' keyword but this will replace property, what you want is not possible with override.
public class BaseClass
{
private BaseClass _Parent;
public virtual decimal Result
{
get { return ((_Parent != null) ? _Parent.Result : -1); }
}
}
public class DerivedClass : BaseClass
{
private decimal _Result;
public new decimal Result
{
get { return _Result; }
set { _Result = value; }
}
}