Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between XmlArrayAttribute and XmlArrayItemAttribute?

What is the difference between XmlArrayAttribute and XmlArrayItemAttribute? Please explain both sides (i.e. serialzing and deserialzing).

like image 546
Mike Cheel Avatar asked Sep 05 '25 03:09

Mike Cheel


1 Answers

A short answer - with the XmlArrayAttribute you change how the whole collection is serialized (so e.g. what is the name of the xml tag that will contain the entries), and with XmlArrayItemAttribute you control every item. Really good examples are here: http://msdn.microsoft.com/en-us/library/2baksw0z.aspx

like image 182
Grzenio Avatar answered Sep 08 '25 00:09

Grzenio