subscribe_method_typeof | Precisamento

subscribe_method_typeof

Home
functions
constants
json
examples

Subscribes the first argument to an event.

Syntax

1
subscribe_method_typeof(type_name, event_name, publisher_id)
Argument Type Description
type_name string The name of the type that defines the event.
event_name string The name of the event.
publisher_id double If it’s an instance event, the id of the owner of the event. Otherwise, it must be less than zero (i.e. noone).

Returns: 1

Description

This function subscribes a method to an event. First load the method, then call this function. The method can be either a delegate (i.e. an Action) or it can be a MethodInfo.

References