Say I have the following code:
class Parent
{
static string MyField = \"ParentField\";
public virtual string DoSomething()
{
return MyField
In one response you seem to indicate that the static field is constant. If that is the case, then this should work for you.
class Parent
{
protected virtual string MyField() { return "ParentField"; }
public virtual string DoSomething()
{
return MyField();
}
}
class Child : Parent
{
protected override string MyField() { return "ChildField"; }
}