Export (0) Print
Expand All

StorageDevice.DeleteContainer Method

Deletes a storage container without opening it. You can do this even if the container is corrupted.

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

public void DeleteContainer (
         string titleName
)

Parameters

titleName
The name of the storage container to delete.

Exception typeCondition
ArgumentNullException titleName is null.
InvalidOperationException

The container is currently open. A container cannot be deleted if it is open.

Dd940266.note(en-us,XNAGameStudio.31).gifNote
No exception will be thrown if the container does not exist.

The string passed to titleName must be the same string used with StorageDevice.OpenContainer.

Usually a storage container is closed with StorageContainer.Dispose so that it can be re-opened with its data intact. Use DeleteContainer only when you want to delete the data permanently or when you determine the storage container has been corrupted.

See the Storage Overview for more information about using storage containers in your title.

Xbox 360, Windows XP SP2, Windows Vista, Zune

Community Additions

ADD
Show:
© 2014 Microsoft