OpenStream Method
Collapse the table of content
Expand the table of content

ContentManager.OpenStream Method

Opens a stream for reading the specified asset. Derived classes can replace this to implement pack files or asset compression.

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

protected virtual Stream OpenStream (
         string assetName


The name of the asset being read.

Return Value

The opened stream.

Exception typeCondition
ContentLoadException Unable to open the file containing assetName, or the file was not found.

Xbox 360, Windows XP SP2, Windows Vista, Zune

Community Additions

© 2015 Microsoft