c# - XmlSerialization Collection as Array -


I am trying to serial a custom class which needs to use several elements of the same name.
I tried to use Xmlarray, but it wraps them into other elements

I have to look at my XML like this.

  & lt; Root & gt; & Lt; Tree & gt; Some text & lt; / Tree & gt; & Lt; Tree & gt; Some more text & lt; / Trees & gt; & Lt; / Root & gt;  

My code:

just use [XmlElement ("tree") Try the following:

Note To clear the output from ArrayList to list changed; In 1.1, string collection will be another option, though there are different case-sensitive rules in it.


Comments