Using [XmlAnyElement]

前端 未结 3 1847
情话喂你
情话喂你 2021-01-20 19:07

I\'m trying to preserve data on two different versions of an object and not having any success with it. Can anyone tell me what I\'m doing wrong?

Version One of the

3条回答
  •  别那么骄傲
    2021-01-20 19:33

    The Xml*Attribute classes are used by XmlSerializer, not by DataContractSerializer. As far as I know, DataContractSerializer doesn't have any mechanism to handle this scenario. If you can, use XmlSerializer instead, it's much more flexible.

提交回复
热议问题