TypeBuilder.DefineEvent(String, EventAttributes, Type) Método

Definición

Agrega un nuevo evento al tipo, con el nombre, los atributos y el tipo de evento especificados.

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

Parámetros

name
String

Nombre del evento. name no puede contener valores NULL incrustados.

attributes
EventAttributes

Atributos del evento.

eventtype
Type

El tipo de evento.

Devoluciones

Evento definido.

Excepciones

La longitud de name es cero.

name es null.

O bien

eventtype es null.

El tipo se creó anteriormente mediante CreateType().

Se aplica a