TypeBuilder.DefineEvent(String, EventAttributes, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a new event to the type, with the given name, attributes and event type.
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
Parameters
- name
- String
The name of the event. name
cannot contain embedded nulls.
- attributes
- EventAttributes
The attributes of the event.
- eventtype
- Type
The type of the event.
Returns
The defined event.
Exceptions
The length of name
is zero.
The type was previously created using CreateType().
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา