I have a method in a base class
class Base
{
private static string Colour = "blue";
string DoStuff() { return ColourProp; }
protected virtual string ColourProp { get{ return Base.Colour; } }
}
that is called on an instance of this subclass
class Sub
{
private static string Colour = "orange";
protected override string ColourProp { get{ return Sub.Colour; } }
}
At the moment I'm using virtual properties, is this the only way? (considering that fields cannot be virtual)...