Export (0) Print
Expand All

ResourceManager.GetStream Method (String, CultureInfo)

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

Returns an UnmanagedMemoryStream object from the specified resource, using the specified culture.

This method is not CLS-compliant.  

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

[CLSCompliantAttribute(false)] 
[ComVisibleAttribute(false)] 
public UnmanagedMemoryStream GetStream (
	string name,
	CultureInfo culture
)
/** @attribute CLSCompliantAttribute(false) */ 
/** @attribute ComVisibleAttribute(false) */ 
public UnmanagedMemoryStream GetStream (
	String name, 
	CultureInfo culture
)
CLSCompliantAttribute(false) 
ComVisibleAttribute(false) 
public function GetStream (
	name : String, 
	culture : CultureInfo
) : UnmanagedMemoryStream

Parameters

name

The name of a resource.

culture

A CultureInfo object that specifies the culture to use for the resource lookup. If culture is a null reference (Nothing in Visual Basic), the culture for the current thread is used.

Return Value

An UnmanagedMemoryStream object.

Exception typeCondition

InvalidOperationException

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

ArgumentNullException

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

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. The resource lookup is based on the culture specified by the culture parameter. If culture is a null reference (Nothing in Visual Basic), the culture for the current thread is used.

This method is useful primarily for performance reasons: retrieving a resource as a 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

ADD
Show:
© 2014 Microsoft