GetResourceData Method
Collapse the table of content
Expand the table of content
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
)

Parameters

resourceName
Type: System.String

The name of a resource.

resourceType
Type: System.String%

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

resourceData
Type: System.Byte[]%

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

ExceptionCondition
ArgumentNullException

resourceName is null.

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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show:
© 2016 Microsoft