Obsolete attribute causes property to be ignored by XmlSerialization

前端 未结 6 1090
臣服心动
臣服心动 2020-12-05 12:54

I\'m refactoring some objects that are serialized to XML but need to keep a few properties for backwards compatibility, I\'ve got a method that converts the old object into

6条回答
  •  无人及你
    2020-12-05 13:31

    1) WAG: Try adding the XmlAttributeAttribute to the property; perhaps this will override the ObsoleteAttribute
    2) PITA: Implement IXmlSerializable

提交回复
热议问题