How do I write objects for easy XML Serialization in VB.NET?
问题 I'm writing a small application in VB.NET and I would like some of the classes to be able to write themselves out to XML to serve as a "save" feature. I have seen XSD files used to generate VB classes that can serialize themselves into and out of XML very easily. How would I do this if I do have any pre-existing XML format that I need to conform to as I'm just creating the classes myself? 回答1: Use the System.Xml and System.Xml.Serialization namespaces. They describe classes that you can use