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().

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