I am serializing an object to XML. I have something like this:
Class A { public string propertyA1 { get; set; } public List bList { get; set
Add the attribute [XmlElement] to treat the collection as a flat list of elements:
[XmlElement]
Class A { public string propertyA1 { get; set; } [XmlElement("B")] public List bList { get; set; } }
for more info click here