.NET Framework Class Library
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)
Syntax

Visual Basic (Declaration)
Public Sub GetResourceData ( _
    resourceName As String, _
    <OutAttribute> ByRef resourceType As String, _
    <OutAttribute> ByRef resourceData As Byte() _
)
Visual Basic (Usage)
Dim instance As ResourceReader
Dim resourceName As String
Dim resourceType As String
Dim resourceData As Byte()

instance.GetResourceData(resourceName, _
    resourceType, resourceData)
C#
public void GetResourceData(
    string resourceName,
    out string resourceType,
    out byte[] resourceData
)
Visual C++
public:
void GetResourceData(
    String^ resourceName, 
    [OutAttribute] String^% resourceType, 
    [OutAttribute] array<unsigned char>^% resourceData
)
JScript
public function GetResourceData(
    resourceName : String, 
    resourceType : String, 
    resourceData : byte[]
)

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: array<System..::.Byte>[]()[]%
When this method returns, contains a byte array that is the binary representation of the retrieved type. This parameter is passed uninitialized.
Exceptions

ExceptionCondition
ArgumentNullException

resourceName is nullNothingnullptra 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.

Platforms

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0
See Also

Reference

Tags :


Community Content

innes
Information on resource types
http://blogs.msdn.com/bclteam/archive/2005/06/07/426325.aspx
Tags :

Page view tracker