TypeBuilder.DefineEvent(String, EventAttributes, Type) Metoda

Definice

Přidá do typu novou událost s daným názvem, atributy a typem události.

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

Parametry

name
String

Název události. name nemůže obsahovat vložené hodnoty null.

attributes
EventAttributes

Atributy události.

eventtype
Type

Typ události.

Návraty

Definovaná událost.

Výjimky

Délka name je nula.

name je null.

nebo

eventtype je null.

Typ byl dříve vytvořen pomocí CreateType().

Platí pro