TypeBuilder.DefineEvent(String, EventAttributes, Type) Метод

Определение

Добавляет новое событие в тип с заданным именем, атрибутами и типом события.

public:
 System::Reflection::Emit::EventBuilder ^ DefineEvent(System::String ^ name, System::Reflection::EventAttributes attributes, Type ^ eventtype);
public System.Reflection.Emit.EventBuilder DefineEvent (string name, System.Reflection.EventAttributes attributes, Type eventtype);
member this.DefineEvent : string * System.Reflection.EventAttributes * Type -> System.Reflection.Emit.EventBuilder
Public Function DefineEvent (name As String, attributes As EventAttributes, eventtype As Type) As EventBuilder

Параметры

name
String

Имя события. Параметр name не может содержать внедренные значения NULL.

attributes
EventAttributes

Атрибуты события.

eventtype
Type

Тип события.

Возвращаемое значение

Определенное событие.

Исключения

Длина параметра name равна нулю.

name имеет значение null.

-или-

eventtype имеет значение null.

Этот тип был создан ранее с помощью CreateType().

Применяется к