Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Methods

Use .NET methods in MATLAB®, method signatures, arguments by reference, optional arguments

Topics

Calling .NET Methods

This topic describes information specific to .NET methods.

Work with .NET Methods Having Multiple Signatures

This example shows how to call a method that has multiple signatures.

Call .NET Methods With out Keyword

This example shows how to call methods that use an out keyword in the argument list.

Call .NET Methods With ref Keyword

This example shows how to call methods that use a ref keyword in the argument list.

Call .NET Methods With params Keyword

This example shows how to call methods that use a params keyword in the argument list.

Call .NET Methods with Optional Arguments

This example shows how to use default values in optional arguments using the Greeting method.

Call .NET Properties That Take an Argument

MATLAB represents a property that takes an argument as a method.

Calling .NET Methods with Optional Arguments

MATLAB displays optional arguments in a method signature using the optional<T> syntax, where T is the specific type.

Calling .NET Extension Methods

Unlike C# applications, MATLAB handles an extension method as a static method of the class that defines the method.

How MATLAB Represents .NET Operators

MATLAB supports overloaded operators, such as the C# operator symbols + and *, as shown in the following table.

Limitations to Support of .NET Methods

The methods and methodsview functions do not list generic methods.

Was this topic helpful?