TypeBuilder.DefineEventCore(String, EventAttributes, Type) 方法

定义

在派生类中重写时,将具有给定名称、属性和事件类型的新事件添加到类型。

protected:
 abstract System::Reflection::Emit::EventBuilder ^ DefineEventCore(System::String ^ name, System::Reflection::EventAttributes attributes, Type ^ eventtype);
protected abstract System.Reflection.Emit.EventBuilder DefineEventCore (string name, System.Reflection.EventAttributes attributes, Type eventtype);
abstract member DefineEventCore : string * System.Reflection.EventAttributes * Type -> System.Reflection.Emit.EventBuilder
Protected MustOverride Function DefineEventCore (name As String, attributes As EventAttributes, eventtype As Type) As EventBuilder

参数

name
String

事件的名称。 name 不能包含嵌入的 null。

attributes
EventAttributes

枚举值的按位组合,用于指定事件的属性。

eventtype
Type

事件类型。

返回

已定义的事件。

适用于