Serializing an array of multiple types using XmlSerializer

后端 未结 3 835
慢半拍i
慢半拍i 2020-12-11 13:47

I\'m trying to use XMLSerializer to generate XML such as the following, where the contents of is an array, but the elements can be of differing t

3条回答
  •  無奈伤痛
    2020-12-11 14:00

    I ended up abandoning XmlSerializer and using Json.NET to serialize the object to json and then convert to XML.

提交回复
热议问题