次の方法で共有


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)

Syntax

public StorageContainer OpenContainer (
         string titleName
)

Parameters

  • titleName
    The name of the XNA Framework title.

Return Value

A StorageContainer containing any files for the title.

Exceptions

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

Remarks

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.

See Also

Reference

StorageDevice Class
StorageDevice Members
Dispose
Microsoft.Xna.Framework.Storage Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista