.NET Ereignisse und Delegate in MATLAB
R2026aEin Delegat ist eine Möglichkeit, C# mitzuteilen, welche Methode aufgerufen werden soll, wenn ein Ereignis ausgelöst wird. Ein Ereignis ist eine Benachrichtigung von .NET über eine eingetretene Aktion. In diesen Artikeln wird erläutert, wie .NET-Ereignisse und -Delegate in MATLAB® verwendet werden.
Funktionen
BeginInvoke | Initiate asynchronous .NET delegate call |
EndInvoke | Retrieve result of asynchronous call initiated by .NET
System.Delegate
BeginInvoke method |
Combine | Static .NET System.Delegate
Combine method |
Remove | Static .NET System.Delegate
Remove method |
RemoveAll | Static .NET System.Delegate
RemoveAll method |
Themen
- Use .NET Events in MATLAB
These examples use the
addlistenerfunction to handle .NET events with MATLAB callbacks. - Call .NET Delegates in MATLAB
This example shows you how to use a delegate in MATLAB.
- Create Delegates from .NET Object Methods
This example shows how to create a delegate.
- Create Delegate Instances Bound to .NET Methods
This example shows how to use delegate instances.
- Combine and Remove .NET Delegates
This example shows how to manage delegates.
- Overview of Events and Listeners
Use events and listeners to send and respond to messages.
- .NET Delegates
In .NET, a delegate is a type that defines a method signature.
- .NET Delegates With out and ref Type Arguments
The MATLAB rules for mapping
outandreftypes for delegates are the same as for methods. - Call .NET Methods Asynchronously
How MATLAB handles asynchronous method calls.
Fehlersuche