This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

.NET Delegates With out and ref Type Arguments

The MATLAB® rules for mapping out and ref types for delegates are the same as for methods.

For example, the following C# statement declares a delegate with a ref argument:

public delegate void delref(ref Double refArg);

The signature for an equivalent MATLAB delegate function maps refArg as both RHS and LHS arguments:

function refArg = myFunc(refArg)

The following C# statement declares a delegate with an out argument:

public delegate void delout(
    Single argIn,  
    out Single argOut);

The signature for an equivalent MATLAB delegate function maps argOut as an LHS argument:

function argOut = myFunc(argIn)

Related Topics