This documentation is archived and is not being maintained.

ResourceReader.GetResourceData Method

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
Not applicable.



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 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