Editare

Partajați prin


MetadataBuilder.AddCustomAttribute Method

Definition

Adds a custom attribute.

public:
 System::Reflection::Metadata::CustomAttributeHandle AddCustomAttribute(System::Reflection::Metadata::EntityHandle parent, System::Reflection::Metadata::EntityHandle constructor, System::Reflection::Metadata::BlobHandle value);
public System.Reflection.Metadata.CustomAttributeHandle AddCustomAttribute (System.Reflection.Metadata.EntityHandle parent, System.Reflection.Metadata.EntityHandle constructor, System.Reflection.Metadata.BlobHandle value);
member this.AddCustomAttribute : System.Reflection.Metadata.EntityHandle * System.Reflection.Metadata.EntityHandle * System.Reflection.Metadata.BlobHandle -> System.Reflection.Metadata.CustomAttributeHandle
Public Function AddCustomAttribute (parent As EntityHandle, constructor As EntityHandle, value As BlobHandle) As CustomAttributeHandle

Parameters

constructor
EntityHandle

A custom attribute constructor: a MethodDefinitionHandle or MemberReferenceHandle.

value
BlobHandle

A custom attribute value blob.

Returns

A handle to the added custom attribute.

Exceptions

parent doesn't have the expected handle kind.

Remarks

Entries may be added in any order. The table is automatically sorted when serialized.

Applies to