Export (0) Print
Expand All

StorageDevice.OpenContainer Method

Opens a StorageContainer containing any files for the specified title.

Namespace: Microsoft.Xna.Framework.Storage
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public StorageContainer OpenContainer (
         string titleName
)

Parameters

titleName
The name of the XNA Framework title.

Return Value

A StorageContainer containing any files for the title.

Exception typeCondition
ArgumentNullException titleName is null.
InvalidOperationExceptionA container is already open for the PlayerIndex set in BeginShowStorageDeviceSelector. A new container cannot be opened until all previous containers used by this PlayerIndex have been disposed.

titleName should be a constant human readable string used to identify your title and generate a title-unique storage location.

After the container has been opened, changes to the files within the container are cached until the container is disposed. For this reason, only one container per profile can be opened at the same time on the same device.

If the storage device is removed or the Xbox 360 console is powered down before the container is disposed, any changes are lost.

Call the Dispose method to dispose a StorageContainer.

Xbox 360, Windows XP SP2, Windows Vista

Community Additions

ADD
Show:
© 2014 Microsoft