TypeBuilder.GetEvent(String, BindingFlags) Método
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Retorna o evento com o nome especificado.
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
- name
- String
O nome do evento a ser pesquisado.
- bindingAttr
- BindingFlags
Uma combinação bit a bit de valores BindingFlags que limita a pesquisa.
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.
Esse método não está implementado para tipos incompletos.
Recupere o tipo usando Type.GetType ou Assembly.GetType e use reflexão no tipo recuperado.
Produto | Versões |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
Comentários do .NET
O .NET é um projeto código aberto. Selecione um link para fornecer comentários: