How to specify the order of XmlAttributes, using XmlSerializer

后端 未结 5 456
轮回少年
轮回少年 2020-12-20 17:49

XmlElement has an \"Order\" attribute which you can use to specify the precise order of your properties (in relation to each other anyway)

5条回答
  •  庸人自扰
    2020-12-20 18:40

    In C#, as far as what I have found, the order of attributes are serialized in the order that they are defined in the class.

    See my answer to this question here: https://stackoverflow.com/a/21468092/607117

提交回复
热议问题