I am trying to work my way through the XNA MSDN documentation on saving and reading game data, and I am not having much luck.
In essence I have a manager class which keeps track multiple instance of base classes.
I want to be able to save the state of the entire list of objects that the manager is keeping track of.
Then load them in the next time the game loads. Basically saving the state of the world.
If you use the XmlSerializer as shown in the XNA 4.0 help, base classes need to have the [XmlInclude(Type)] attribute specified for each concrete type they can be serialized into.
Below is an example of how to save game data in XNA 4.0. Press F1 to save once the game is running. The data will be saved to a location similar to C:\Users\{username}\Documents\SavedGames\WindowsGame\Game1StorageContainer\Player1.
Loading the data again is a very similar process.
To get this working on XBox add references to Microsoft.Xna.Framework.GamerServices & System.Xml.Serialization.