TypeBuilder.DefineEvent(String, EventAttributes, Type) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
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.
O tipo foi anteriormente criado usando CreateType().