MetadataBuilder.AddEvent(EventAttributes, StringHandle, EntityHandle) 方法

定義

新增事件定義。

public:
 System::Reflection::Metadata::EventDefinitionHandle AddEvent(System::Reflection::EventAttributes attributes, System::Reflection::Metadata::StringHandle name, System::Reflection::Metadata::EntityHandle type);
public System.Reflection.Metadata.EventDefinitionHandle AddEvent (System.Reflection.EventAttributes attributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.EntityHandle type);
member this.AddEvent : System.Reflection.EventAttributes * System.Reflection.Metadata.StringHandle * System.Reflection.Metadata.EntityHandle -> System.Reflection.Metadata.EventDefinitionHandle
Public Function AddEvent (attributes As EventAttributes, name As StringHandle, type As EntityHandle) As EventDefinitionHandle

參數

attributes
EventAttributes

事件屬性。

name
StringHandle

事件名稱。

傳回

已新增之事件定義的控制代碼。

例外狀況

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

適用於