Assembly.GetManifestResourceStream Method (String)
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Loads the specified manifest resource from this assembly.
Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Overridable Function GetManifestResourceStream ( _
name As String _
) As Stream
public virtual Stream GetManifestResourceStream(
string name
)
Parameters
- 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; nulla null reference (Nothing in Visual Basic) if no resources were specified during compilation, or if the resource is not visible to the caller.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The name parameter is nulla null reference (Nothing in Visual Basic). |
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. |
Remarks
Resource information is returned only if the resource is visible to the caller. This method returns nulla null reference (Nothing in Visual Basic) if a private resource in another assembly is accessed
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
XNA Framework
Supported in: Xbox 360, Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.