NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TypeBuilder.DefineEvent

Adds a new event to the class, with the given name, attributes and event type.

[Visual Basic]
Public Function DefineEvent( _
   ByVal name As String, _
   ByVal attributes As EventAttributes, _
   ByVal eventtype As Type _
) As EventBuilder
[C#]
public EventBuilder DefineEvent(
   string name,
   EventAttributes attributes,
   Type eventtype
);
[C++]
public: EventBuilder* DefineEvent(
   String* name,
   EventAttributes attributes,
   Type* eventtype
);
[JScript]
public function DefineEvent(
   name : String,
   attributes : EventAttributes,
   eventtype : Type
) : EventBuilder;

Parameters

name
The name of the event.
attributes
The attributes of the event.
eventtype
The type of the event.

Return Value

The defined event.

Exceptions

Exception Type Condition
ArgumentNullException if name is a null reference (in Visual Basic Nothing)
InvalidOperationException if the type was previously created using CreateType

See Also

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace