TypeBuilder.GetEvent(String, BindingFlags) Método

Definição

Retorna o evento com o nome especificado.Returns the event with the specified name.

public:
 override System::Reflection::EventInfo ^ GetEvent(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public override System.Reflection.EventInfo? GetEvent (string name, System.Reflection.BindingFlags bindingAttr);
public override System.Reflection.EventInfo GetEvent (string name, System.Reflection.BindingFlags bindingAttr);
override this.GetEvent : string * System.Reflection.BindingFlags -> System.Reflection.EventInfo
Public Overrides Function GetEvent (name As String, bindingAttr As BindingFlags) As EventInfo

Parâmetros

name
String

O nome do evento a ser pesquisado.The name of the event to search for.

bindingAttr
BindingFlags

Uma combinação bit a bit de valores BindingFlags que limita a pesquisa.A bitwise combination of BindingFlags values that limits the search.

Retornos

EventInfo

Um objeto EventInfo que representa o evento declarado ou herdado por esse tipo com o nome especificado ou null se não houver correspondências.An EventInfo object representing the event declared or inherited by this type with the specified name, or null if there are no matches.

Exceções

Esse método não está implementado para tipos incompletos.This method is not implemented for incomplete types.

Comentários

Recupere o tipo usando Type.GetType ou Assembly.GetType e use reflexão no tipo recuperado.Retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.

Aplica-se a