GetManifestResourceStream Method (Type, String)
Collapse the table of content
Expand the table of content

Assembly.GetManifestResourceStream Method (Type, String)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Overridable Function GetManifestResourceStream ( _
	type As Type, _
	name As String _
) As Stream

Parameters

type
Type: System.Type
The type whose namespace is used to scope the manifest resource name.
name
Type: System.String
The case-sensitive name of the manifest resource being requested.

Return Value

Type: System.IO.Stream
A Stream representing the manifest resource; Nothing if no resources were specified during compilation or if the resource is not visible to the caller.

ExceptionCondition
ArgumentNullException

The name parameter is Nothing.

ArgumentException

The name parameter is an empty string ("").

FileLoadException

A file that was found could not be loaded.

FileNotFoundException

name was not found.

BadImageFormatException

name is not a valid assembly.

MemberAccessException

The method is invoked late-bound through mechanisms such as Type.InvokeMember.

For example, if the full name specified for type is "MyNameSpace.MyClasses" and name is "Net", this method overload searches for a resource named "MyNameSpace.Net".

Resource information is returned only if the resource is visible to the caller. This method returns Nothing if a private resource in another assembly is accessed

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft