संपादित करें

इसके माध्यम से साझा किया गया


MetadataBuilder.AddMethodImplementation Method

Definition

Defines an implementation for a method declaration within a type.

public:
 System::Reflection::Metadata::MethodImplementationHandle AddMethodImplementation(System::Reflection::Metadata::TypeDefinitionHandle type, System::Reflection::Metadata::EntityHandle methodBody, System::Reflection::Metadata::EntityHandle methodDeclaration);
public System.Reflection.Metadata.MethodImplementationHandle AddMethodImplementation (System.Reflection.Metadata.TypeDefinitionHandle type, System.Reflection.Metadata.EntityHandle methodBody, System.Reflection.Metadata.EntityHandle methodDeclaration);
member this.AddMethodImplementation : System.Reflection.Metadata.TypeDefinitionHandle * System.Reflection.Metadata.EntityHandle * System.Reflection.Metadata.EntityHandle -> System.Reflection.Metadata.MethodImplementationHandle
Public Function AddMethodImplementation (type As TypeDefinitionHandle, methodBody As EntityHandle, methodDeclaration As EntityHandle) As MethodImplementationHandle

Parameters

type
TypeDefinitionHandle

The type definition.

methodBody
EntityHandle

The method body entity handle, which can be one of the following: MethodDefinitionHandle or MemberReferenceHandle.

methodDeclaration
EntityHandle

The method declaration entity handle, which can be one of the following: MethodDefinitionHandle or MemberReferenceHandle.

Returns

A handle to the added method implementation.

Exceptions

methodBody or methodDeclaration doesn't have the expected handle kind.

Remarks

Method implementations must be added in the same order as the corresponding type definitions.

Applies to