Export (0) Print
Expand All

Assembly.GetManifestResourceStream Method (Type, String)

.NET Framework 1.1

Loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly.

[Visual Basic]
Overloads Public Overridable Function GetManifestResourceStream( _
   ByVal type As Type, _
   ByVal name As String _
) As Stream
[C#]
public virtual Stream GetManifestResourceStream(
 Type type,
 string name
);
[C++]
public: virtual Stream* GetManifestResourceStream(
 Type* type,
 String* name
);
[JScript]
public function GetManifestResourceStream(
   type : Type,
 name : String
) : Stream;

Parameters

type
The type whose namespace is used to scope the manifest resource name.
name
The name of the manifest resource being requested.

Return Value

A Stream representing this manifest resource.

Exceptions

Exception Type Condition
ArgumentNullException The name parameter is a null reference (Nothing in Visual Basic).
ArgumentException The name parameter is the empty string ("").
SecurityException The caller does not have the required permission.

Remarks

This method works on both public and private resources.

Example

If the full name of type is "MyNameSpace.MyClasses" and name is "Net", GetManifestResourceStream will search for a resource named MyNameSpace.Net.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

.NET Framework Security: 

See Also

Assembly Class | Assembly Members | System.Reflection Namespace | Assembly.GetManifestResourceStream Overload List | Assembly Manifest

Show:
© 2014 Microsoft