Loads the specified manifest resource from this assembly.
Public Overridable Function GetManifestResourceStream ( _ name As String _ ) As Stream
Dim instance As [Assembly] Dim name As String Dim returnValue As Stream returnValue = instance.GetManifestResourceStream(name)
public virtual Stream GetManifestResourceStream( string name )
public: virtual Stream^ GetManifestResourceStream( String^ name )
public function GetManifestResourceStream( name : String ) : Stream
The name parameter is nullNothingnullptra null reference (Nothing in Visual Basic).
The name parameter is an empty string ("").
A file that was found could not be loaded.
name was not found.
name is not a valid assembly.
Resource information is returned only if the resource is visible to the caller, or the caller has ReflectionPermission.
This method returns nullNothingnullptra null reference (Nothing in Visual Basic) if a private resource in another assembly is accessed and the caller does not have ReflectionPermission with the ReflectionPermissionFlag..::.MemberAccess flag.
If the assembly manifest lists a resource file, GetManifestResourceStream returns a Stream object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting Stream object to the ResourceReader constructor causes an ArgumentException.
to access a private resource. Associated enumeration: ReflectionPermissionFlag..::.MemberAccess
when invoked late-bound through mechanisms such as Type..::.InvokeMember. Associated enumeration: ReflectionPermissionFlag..::.MemberAccess.
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, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune