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

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


The name of the storage container to delete.

Exception typeCondition
ArgumentNullException titleName is null.

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

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

© 2015 Microsoft