Export (0) Print
Expand All

ResourceManager.GetStream Method (String)

Returns an UnmanagedMemoryStream object from the specified resource.

Namespace:  System.Resources
Assembly:  mscorlib (in mscorlib.dll)

[ComVisibleAttribute(false)]
public UnmanagedMemoryStream GetStream(
	string name
)

Parameters

name
Type: System.String
The name of a resource.

Return Value

Type: System.IO.UnmanagedMemoryStream
An unmanaged memory stream.

ExceptionCondition
InvalidOperationException

The value of the specified resource is not a MemoryStream object.

ArgumentNullException

name is null.

MissingManifestResourceException

No usable set of resources is found, and there are no neutral resources.

The GetStream method takes the name of a resource that is stored as a MemoryStream object, gets the value of the Object resource, and returns an UnmanagedMemoryStream object. This method is useful primarily for performance reasons: retrieving a resource as an UnmanagedMemoryStream object instead of an explicit object can improve performance.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft