AssemblyBuilder.GetManifestResourceStream 方法

定义

从此程序集加载指定的清单资源。Loads the specified manifest resource from this assembly.

重载

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)

从此程序集加载指定的清单资源。Loads the specified manifest resource from this assembly.

public:
 override System::IO::Stream ^ GetManifestResourceStream(System::String ^ name);
public override System.IO.Stream? GetManifestResourceStream (string name);
public override System.IO.Stream GetManifestResourceStream (string name);
override this.GetManifestResourceStream : string -> System.IO.Stream
Public Overrides Function GetManifestResourceStream (name As String) As Stream

参数

name
String

正在请求的清单资源的名称。The name of the manifest resource being requested.

返回

Stream

表示此清单资源的 StreamA Stream representing this manifest resource.

例外

目前尚不支持此方法。This method is not currently supported.

调用方没有所要求的权限。The caller does not have the required permission.

适用于

GetManifestResourceStream(Type, String)

从此程序集加载指定清单资源,清单资源的范围由指定类型的命名空间确定。Loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly.

public:
 override System::IO::Stream ^ GetManifestResourceStream(Type ^ type, System::String ^ name);
public override System.IO.Stream? GetManifestResourceStream (Type type, string name);
public override System.IO.Stream GetManifestResourceStream (Type type, string name);
override this.GetManifestResourceStream : Type * string -> System.IO.Stream
Public Overrides Function GetManifestResourceStream (type As Type, name As String) As Stream

参数

type
Type

其命名空间用于确定清单资源名的范围的类型。The type whose namespace is used to scope the manifest resource name.

name
String

正在请求的清单资源的名称。The name of the manifest resource being requested.

返回

Stream

表示此清单资源的 StreamA Stream representing this manifest resource.

例外

目前尚不支持此方法。This method is not currently supported.

调用方没有所要求的权限。The caller does not have the required permission.

示例

如果的完整名称 type 为 "MyNameSpace. MyClasses" 且 name 为 "Dot", GetManifestResourceStream 将搜索名为 MyNameSpace 的资源。If the full name of type is "MyNameSpace.MyClasses" and name is "Dot", GetManifestResourceStream will search for a resource named MyNameSpace.Dot.

注解

返回的将 Stream 其文件指针设置为资源的开头。The returned Stream has its file pointer set to the beginning of the resource.

适用于