How do I write objects for easy XML Serialization in VB.NET?

后端 未结 3 718
离开以前
离开以前 2020-12-19 21:45

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 fi

3条回答
  •  半阙折子戏
    2020-12-19 21:57

    To go with a simple 'save' feature either use the .net xml serialization [1] or create yourself a n in memory DateSet to persist the 'state of the world' in as many DateTables as your see fit. It rather depends how complext your object model that you are trying to persist is.

    [1] simplest example I could find quickly (C#, sorry but you'll get the gist) http://www.jonasjohn.de/snippets/csharp/xmlserializer-example.htm

提交回复
热议问题