MetadataBuilder.AddExportedType Method

Definition

Adds an exported type.

C#
public System.Reflection.Metadata.ExportedTypeHandle AddExportedType(System.Reflection.TypeAttributes attributes, System.Reflection.Metadata.StringHandle namespace, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.EntityHandle implementation, int typeDefinitionId);

Parameters

attributes
TypeAttributes

The type attributes.

namespace
StringHandle

The type namespace.

name
StringHandle

The type name.

implementation
EntityHandle

The implementation entity handle, which can be one of the following: an AssemblyFileHandle, ExportedTypeHandle, or AssemblyReferenceHandle.

typeDefinitionId
Int32

The type definition ID.

Returns

A handle to the added exported type.

Exceptions

implementation doesn't have the expected handle kind.

Applies to

Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)