Implementing IXmlSerializable on a collection object
问题 I have an xml file looking somewhat like this: <xml> <A>value</A> <B>value</B> <listitems> <item> <C>value</C> <D>value</D> </item> </listitems> </xml> And I have a two objects representing this xml: class XmlObject { public string A { get; set; } public string B { get; set; } List<Item> listitems { get; set; } } class Item : IXmlSerializable { public string C { get; set; } public string D { get; set; } //Implemented IXmlSerializeable read/write public void ReadXml(System.Xml.XmlReader reader