I am serializing an object to XML. I have something like this:
Class A
{
public string propertyA1 { get; set; }
public List bList { get; set
Also you can try XmlArrayItemAttribute. Please refer below links.
http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlarrayitemattribute.aspx
http://msdn.microsoft.com/en-us/library/2baksw0z(v=vs.71).aspx
Add the attribute [XmlElement]
to treat the collection as a flat list of elements:
Class A
{
public string propertyA1 { get; set; }
[XmlElement("B")]
public List<B> bList { get; set; }
}
for more info click here