MetadataBuilder.AddCustomAttribute 方法

定義

新增自訂屬性。

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

參數

constructor
EntityHandle

自訂屬性建構函式:MethodDefinitionHandleMemberReferenceHandle

value
BlobHandle

自訂屬性值 Blob。

傳回

已新增之自訂屬性的控制代碼。

例外狀況

parent 沒有預期的控制代碼種類。

備註

專案可以依任何順序新增。 序列化時會自動排序數據表。

適用於