This documentation is archived and is not being maintained.

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
public virtual Stream GetManifestResourceStream(
 Type type,
 string name
public: virtual Stream* GetManifestResourceStream(
 Type* type,
 String* name
public function GetManifestResourceStream(
   type : Type,
 name : String
) : Stream;


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

Return Value

A Stream representing this manifest resource.


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.


This method works on both public and private resources.


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


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