This is a follow up question to:
Serialization breaks in .NET 4.5
I have a property in legacy code which is causing me grief in serialization on .NET 4.5.
This is the property:
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
private new object Value
{
get
{
return base.Value;
}
set
{
base.Value = value;
}
}
Which was probably introduced to try to hide the "Value" property of the base class. The only solution which worked so far was to the let the serializer know I want to serialize in .NET4. But this is a problem for me. (This configuration should be set only if .NET 4.5 is installed on the traget computer , otherwise an exception is raised).
I guess I can remove the property all together, but since I'm dealing with a large and complicated legacy system I'm not sure what the side effects might be.
So my quesion is twofold:
Why does the inhertied property breaks .NET 4.5 serialization?
What nasty side effects should I expect if I remove the inherited property?