Bagikan melalui


ContentManager.OpenStream Method

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

Syntax

'Declaration
Protected Overridable Function OpenStream ( _
         assetName As String _
) As Stream 
protected virtual Stream OpenStream (
         string assetName
)
protected:
virtual Stream OpenStream(
         String assetName
)

Parameters

  • assetName
    Type: String
    The name of the asset being read.

Return Value

Type: Stream
The opened stream.

Exceptions

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

Requirements

Namespace: Microsoft.Xna.Framework.Content

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

See Also

Reference

ContentManager Class
ContentManager Members
Microsoft.Xna.Framework.Content Namespace

Platforms

Windows Phone