TypeBuilder.DefineEvent(String, EventAttributes, Type) Metoda

Definice

Přidá k 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 nesmí obsahovat vložené hodnoty null.

attributes
EventAttributes

Atributy události.

eventtype
Type

Typ události.

Návraty

Definovaná událost.

Výjimky

Délka je name nula.

name je null.

-nebo-

eventtype je null.

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

Platí pro