Serializing a Nullable in to XML

后端 未结 5 633
灰色年华
灰色年华 2020-12-02 22:34

I am trying to serialize a class several of the data-members are Nullable objects, here is a example

[XmlAttribute(\"AccountExpirationDate\")]
public Nullabl         


        
5条回答
  •  失恋的感觉
    2020-12-02 23:27

    You can only serialize it as an XmlElement, not as an XmlAttribute, as the representation is too complex for an attribute. That's what the exception is telling you.

提交回复
热议问题