Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Storage

The Microsoft.Xna.Framework.Storage namespace provides classes that allow reading and writing of files.

In This Section

Storage Overview
The XNA Framework provides a set of classes in the Microsoft.Xna.Framework.Storage namespace that are used to read and write files from user storage and title storage, including player saves or title data.
How to: Create a File
This example demonstrates how to use the StorageContainer class to create a save game file in the title storage area on a device specified by the gamer. This example assumes you have already obtained a StorageDevice - to obtain a StorageDevice, see How to: Get a StorageDevice Asynchronously.
How to: Copy a File
This example demonstrates how to use the StorageContainer class to copy a save game file in the title storage area on a device specified by the gamer. This example assumes you have already obtained a StorageDevice - to obtain a StorageDevice, see How to: Get a StorageDevice Asynchronously.
How to: Rename a File
This example demonstrates how to use the StorageContainer class to rename a save game file in the title storage area on a device specified by the gamer. This example assumes you have already obtained a StorageDevice - to obtain a StorageDevice, see How to: Get a StorageDevice Asynchronously.
How to: Enumerate Files
This example demonstrates how to use the StorageContainer class to get a list of save game files in the title storage area on a device specified by the gamer. This example assumes you have already obtained a StorageDevice - to obtain a StorageDevice, see How to: Get a StorageDevice Asynchronously.
How to: Delete a File
This example demonstrates how to use the StorageContainer class to delete a save game file in the title storage area on a device specified by the gamer. This example assumes you have already obtained a StorageDevice - to obtain a StorageDevice, see How to: Get a StorageDevice Asynchronously.
How to: Load a Game Data File
This example demonstrates how to use the File class to read a file from the game image directory.
How to: Serialize Data
This example demonstrates how to use the XmlSerializer class to write data in a custom class to a save game, and how to load the data from the file.
How to: Get a StorageDevice Asynchronously
This example demonstrates how to call BeginShowStorageDeviceGuide and EndShowStorageDeviceGuide to get a StorageDevice object asynchronously.
Show:
© 2015 Microsoft