语言

MetadataBuilder.AddMethodImport 方法

定义

将导入信息添加到方法定义。

public:
 void AddMethodImport(System::Reflection::Metadata::MethodDefinitionHandle method, System::Reflection::MethodImportAttributes attributes, System::Reflection::Metadata::StringHandle name, System::Reflection::Metadata::ModuleReferenceHandle module);
public void AddMethodImport(System.Reflection.Metadata.MethodDefinitionHandle method, System.Reflection.MethodImportAttributes attributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.ModuleReferenceHandle module);
member this.AddMethodImport : System.Reflection.Metadata.MethodDefinitionHandle * System.Reflection.MethodImportAttributes * System.Reflection.Metadata.StringHandle * System.Reflection.Metadata.ModuleReferenceHandle -> unit
Public Sub AddMethodImport (method As MethodDefinitionHandle, attributes As MethodImportAttributes, name As StringHandle, module As ModuleReferenceHandle)

参数

method
MethodDefinitionHandle

方法定义句柄。

attributes
MethodImportAttributes

方法导入属性。

name
StringHandle

非托管方法名称。

module
ModuleReferenceHandle

包含非托管方法的模块。

注解

方法导入必须按与相应方法定义相同的顺序添加。

适用于