This documentation is archived and is not being maintained.

ResourceManager.GetStream Method (String)

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 CLSCompliantAttribute(false) */ 
/** @attribute ComVisibleAttribute(false) */ 
public UnmanagedMemoryStream GetStream (
	String name
public function GetStream (
	name : String
) : UnmanagedMemoryStream
Not applicable.



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 Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0