Переопределение базового свойства
public class A { public string prop { get{ ...some logic...; } } public string method() { string p = do something calculation using prop. return p; } } public class B { // i would like to override property prop, // so when i call B.method from client, the return value will be calculated //based on overrided property }
Что я уже пробовал:
if the property can be override, or only the method can be. Is there any idea to implement this if keep the property.