Export (0) Print
Expand All

ResourceReader.GetResourceData Method

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

Retrieves the type name and data content of a named resource from an open resource file or stream.

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

public void GetResourceData (
	string resourceName,
	out string resourceType,
	out byte[] resourceData
public void GetResourceData (
	String resourceName, 
	/** @attribute OutAttribute() */ /** @ref */ String resourceType, 
	/** @attribute OutAttribute() */ /** @ref */ byte[] resourceData
JScript does not support passing value-type arguments by reference.



The name of a resource.


When this method returns, contains a string that is the type name of the retrieved type. This parameter is passed uninitialized.


When this method returns, contains a byte array that is the binary representation of the retrieved type. This parameter is passed uninitialized.

Exception typeCondition


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


resourceName does not exist.


The retrieved resource data is corrupted.


The current ResourceReader object is not initialized. The probable cause is that the ResourceReader object is closed.

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

© 2014 Microsoft