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.

Parameters

resourceName

The name of a resource.

resourceType

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

resourceData

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

Exception typeCondition

ArgumentNullException

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

ArgumentException

resourceName does not exist.

FormatException

The retrieved resource data is corrupted.

InvalidOperationException

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