ResourceManager.GetStream Method (String)

Note: This method is new in the .NET Framework version 2.0.

Returns an UnmanagedMemoryStream object from the specified resource.

This method is not CLS-compliant.  

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

public UnmanagedMemoryStream GetStream (
	string name
/** @attribute ComVisibleAttribute(false) */ 
/** @attribute CLSCompliantAttribute(false) */ 
public UnmanagedMemoryStream GetStream (
	String name
public function GetStream (
	name : String
) : UnmanagedMemoryStream



The name of a resource.

Return Value

An UnmanagedMemoryStream object.

Exception typeCondition


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


name is a null reference (Nothing in Visual Basic).


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 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions