Udostępnij przez


TypeBuilder.DefineEvent(String, EventAttributes, Type) Metoda

Definicja

Dodaje nowe zdarzenie do typu z daną nazwą, atrybutami i typem zdarzenia.

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

Nazwa zdarzenia. name Program nie może zawierać osadzonych wartości null.

attributes
EventAttributes

Atrybuty zdarzenia.

eventtype
Type

Typ zdarzenia.

Zwraca

Zdefiniowane zdarzenie.

Wyjątki

Długość name to zero.

name to null.

-lub-

eventtype to null.

Typ został wcześniej utworzony przy użyciu polecenia CreateType().

Dotyczy