Επεξεργασία

Κοινή χρήση μέσω


MetadataBuilder.AddInterfaceImplementation Method

Definition

Adds an interface implementation to a type.

public:
 System::Reflection::Metadata::InterfaceImplementationHandle AddInterfaceImplementation(System::Reflection::Metadata::TypeDefinitionHandle type, System::Reflection::Metadata::EntityHandle implementedInterface);
public System.Reflection.Metadata.InterfaceImplementationHandle AddInterfaceImplementation (System.Reflection.Metadata.TypeDefinitionHandle type, System.Reflection.Metadata.EntityHandle implementedInterface);
member this.AddInterfaceImplementation : System.Reflection.Metadata.TypeDefinitionHandle * System.Reflection.Metadata.EntityHandle -> System.Reflection.Metadata.InterfaceImplementationHandle
Public Function AddInterfaceImplementation (type As TypeDefinitionHandle, implementedInterface As EntityHandle) As InterfaceImplementationHandle

Parameters

type
TypeDefinitionHandle

The type implementing the interface.

implementedInterface
EntityHandle

The interface being implemented, which can be one of the following: TypeDefinitionHandle, TypeReferenceHandle, or TypeSpecificationHandle.

Returns

A handle to the added interface implementation.

Exceptions

implementedInterface doesn't have the expected handle kind.

Remarks

Interface implementations must be added in the same order as the corresponding type definitions implementing the interface.

If a type implements multiple interfaces, the corresponding entries must be added in the order determined by their coded indices (CodedIndex.TypeDefOrRefOrSpec(EntityHandle)).

Applies to