VirtualTypeBuilder.EventInfoCollection.Add Método
Definição
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.
Sobrecargas
| Add(EventInfo) |
Adiciona uma EventInfo ao final da coleção. |
| Add(String, Type) |
Adiciona uma EventInfo ao final da coleção. |
| Add(String, Type, Attribute[]) |
Adiciona uma EventInfo ao final da coleção. |
| Add(String, Type, Attribute[], MethodAttributes) |
Adiciona uma EventInfo ao final da coleção. |
Add(EventInfo)
Adiciona uma EventInfo ao final da coleção.
public:
int Add(System::Reflection::EventInfo ^ value);
public int Add (System.Reflection.EventInfo value);
member this.Add : System.Reflection.EventInfo -> int
Public Function Add (value As EventInfo) As Integer
Parâmetros
Retornos
O índice no qual o valor foi adicionado.
Aplica-se a
Add(String, Type)
Adiciona uma EventInfo ao final da coleção.
public:
int Add(System::String ^ name, Type ^ handlerType);
public:
int Add(Platform::String ^ name, Platform::Type ^ handlerType);
public int Add (string name, Type handlerType);
member this.Add : string * Type -> int
Public Function Add (name As String, handlerType As Type) As Integer
Parâmetros
- name
- String
O nome do evento a ser adicionado.
- handlerType
- Type
O tipo de delegado que esse evento representa.
Retornos
O índice no qual o valor foi adicionado.
Exceções
name ou handlerType é null.
handlerType Não é um tipo de tempo de execução.
Aplica-se a
Add(String, Type, Attribute[])
Adiciona uma EventInfo ao final da coleção.
public:
int Add(System::String ^ name, Type ^ handlerType, cli::array <Attribute ^> ^ attributes);
public:
int Add(Platform::String ^ name, Platform::Type ^ handlerType, Platform::Array <Platform::Metadata::Attribute ^> ^ attributes);
public int Add (string name, Type handlerType, Attribute[] attributes);
member this.Add : string * Type * Attribute[] -> int
Public Function Add (name As String, handlerType As Type, attributes As Attribute()) As Integer
Parâmetros
- name
- String
O nome do evento a ser adicionado.
- handlerType
- Type
O tipo de delegado que esse evento representa.
Retornos
O índice no qual o valor foi adicionado.
Exceções
name ou handlerType um elemento em attributes é null . attributes pode ser null .
handlerType Não é um tipo de tempo de execução.
Aplica-se a
Add(String, Type, Attribute[], MethodAttributes)
Adiciona uma EventInfo ao final da coleção.
public:
int Add(System::String ^ name, Type ^ handlerType, cli::array <Attribute ^> ^ attributes, System::Reflection::MethodAttributes methodAttributes);
public int Add (string name, Type handlerType, Attribute[] attributes, System.Reflection.MethodAttributes methodAttributes);
member this.Add : string * Type * Attribute[] * System.Reflection.MethodAttributes -> int
Public Function Add (name As String, handlerType As Type, attributes As Attribute(), methodAttributes As MethodAttributes) As Integer
Parâmetros
- name
- String
O nome do evento a ser adicionado.
- handlerType
- Type
O tipo de delegado que esse evento representa.
- methodAttributes
- MethodAttributes
Os únicos atributos de método com suporte no momento são Public e/ou Static .
Retornos
O índice no qual o valor foi adicionado.
Exceções
name ou handlerType um elemento em attributes é null . attributes pode ser null .
handlerType Não é um tipo de tempo de execução-ou-não methodAttributes contém Public ou contém bits de conjunto diferente de Public e Static , ou os atributos passados por meio do attributes parâmetro não podem ser aplicados a eventos.