AssemblyBuilder.GetManifestResourceStream Method

Definition

Loads the specified manifest resource from this assembly.

Overloads

GetManifestResourceStream(String)

Loads the specified manifest resource from this assembly.

GetManifestResourceStream(Type, String)

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

GetManifestResourceStream(String)

Source:
AssemblyBuilder.cs
Source:
AssemblyBuilder.cs
Source:
AssemblyBuilder.cs

Loads the specified manifest resource from this assembly.

C#
public override System.IO.Stream? GetManifestResourceStream(string name);
C#
public override System.IO.Stream GetManifestResourceStream(string name);

Parameters

name
String

The name of the manifest resource being requested.

Returns

A Stream representing this manifest resource.

Exceptions

This method is not currently supported.

The caller does not have the required permission.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1

GetManifestResourceStream(Type, String)

Source:
AssemblyBuilder.cs
Source:
AssemblyBuilder.cs
Source:
AssemblyBuilder.cs

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

C#
public override System.IO.Stream? GetManifestResourceStream(Type type, string name);
C#
public override System.IO.Stream GetManifestResourceStream(Type type, string name);

Parameters

type
Type

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

name
String

The name of the manifest resource being requested.

Returns

A Stream representing this manifest resource.

Exceptions

This method is not currently supported.

The caller does not have the required permission.

Examples

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

Remarks

The returned Stream has its file pointer set to the beginning of the resource.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)