简体   繁体   English

XmlArrayAttribute和XmlArrayItemAttribute有什么区别?

[英]What is the difference between XmlArrayAttribute and XmlArrayItemAttribute?

What is the difference between XmlArrayAttribute and XmlArrayItemAttribute? XmlArrayAttribute和XmlArrayItemAttribute有什么区别? Please explain both sides (ie serialzing and deserialzing). 请解释双方(即序列化和反序列化)。

A short answer - with the XmlArrayAttribute you change how the whole collection is serialized (so eg what is the name of the xml tag that will contain the entries), and with XmlArrayItemAttribute you control every item. 简短的回答 - 使用XmlArrayAttribute更改整个集合的序列化方式(例如,包含条目的xml标记的名称是什么),并使用XmlArrayItemAttribute控制每个项目。 Really good examples are here: http://msdn.microsoft.com/en-us/library/2baksw0z.aspx 这里真的很好的例子: http//msdn.microsoft.com/en-us/library/2baksw0z.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM