GetStream Method (String)
Collapse the table of content
Expand the table of content

ResourceManager.GetStream Method (String)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns an UnmanagedMemoryStream object from the specified resource.

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

public UnmanagedMemoryStream GetStream(
	string name


Type: System.String
The name of a resource.

Return Value

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


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


name is null.


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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2016 Microsoft