Say I have the following code:
class Parent
{
static string MyField = \"ParentField\";
public virtual string DoSomething()
{
return MyField
You have to handle this in Child, too:
class Child
{
static new string MyField = "ChildField";
public override string DoSomething()
{
return MyField;
}
}
That being said, using a single virtual property would probably be a cleaner design, since you wouldn't need the "new" keyword to hide the Parent's member field.