Wednesday, July 4, 2018

Adding Handlers in Code

Use special X++ syntax to remove or add event handlers to events. The delegate
name appears on the left side of the += operator. On the right side the keyword
event handler is given, together with the eventhandler keyword and the qualified
name of the handler to add. The compiler will ensure that the parameter profiles
of the delegate and the handler match.



1
2
3
4
5
private void AddStaticHandler()
{
   this.MyDelegate += eventhandler
   (Subscriber::MyHandler);
}

Best Regards,
Hossein Karimi

No comments:

Post a Comment

Configure the Firewall on the Enterprise Portal Server

After you install Enterprise Portal, enable Web Server (HTTP) in Windows Firewall. If you do not enable the web server in Windows Firewall...