A delegate is a way to tell C# which method to call when an event is triggered. An event is a notification by the .NET framework that an action has occurred. These topics show how to use .NET events and delegates in MATLAB®.
|Initiate asynchronous .NET delegate call|
|Retrieve result of asynchronous call initiated by .NET System.Delegate BeginInvoke method|
|Convenience function for static .NET System.Delegate Combine method|
|Convenience function for static .NET System.Delegate Remove method|
|Convenience function for static .NET System.Delegate RemoveAll method|
These examples use the
addlistener function to handle .NET events
with MATLAB callbacks.
This example shows you how to use a delegate in MATLAB.
This example shows how to create a delegate.
This example shows how to use delegate instances.
This example shows how to manage delegates.
Use events and listeners to send and respond to messages.
In the .NET Framework, a delegate is a type that defines a method signature.
The MATLAB rules for mapping
for delegates are the same as for methods.
How MATLAB handles asynchronous method calls.