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

Definição

Adiciona um novo evento ao tipo, com o nome próprio, atributos e tipo de evento.

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

O nome do evento. name não pode conter nulos embutidos.

attributes
EventAttributes

Os atributos do evento.

eventtype
Type

O tipo de evento.

Devoluções

O evento definido.

Exceções

O comprimento de name é zero.

name é null.

-ou-

eventtype é null.

O tipo foi anteriormente criado usando CreateType().

Aplica-se a