XML serializing arrays with type=“array” in .NET?

You can also take a look at Controlling XML Serialization Using Attributes.

You can also take a look at Controlling XML Serialization Using Attributes. Something like this may work for you XmlRoot(ElementName="People") public class PeopleType { XmlElement(ElementName="Person") public List people = new List() { new Person { FirstName = "Bob" }, new Person { FirstName = "Sally" } }; XmlAttribute public string type = "array"; } PeopleType p = new PeopleType(); XmlSerializerNamespaces ns = new XmlSerializerNamespaces(); ns. Add("", ""); XmlSerializer xs = new XmlSerializer(typeof(PeopleType)); using (StreamWriter sw = new StreamWriter("out.

Xml", false)) xs. Serialize(sw, p, ns).

This works great. I just want to point out that it does NOT work with JSON serialization however. You'll get {"people":...} when what you want is just .... That it said, it solves the xml issue perfectly.

– Kevin Berridge Feb 6 '10 at 19:50.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions