MATLAB® supports the .NET features C# supports, except for the limits noted in the following table.
Features Not Supported in MATLAB |
---|
Cannot use ClassName.propertyname syntax
to set static properties. Use NET.setStaticProperty instead. |
Unloading an assembly |
Passing a structure array, sparse array, or complex number to a .NET property or method |
Subclassing .NET classes from MATLAB |
Accessing nonpublic class members |
Displaying generic methods using methods or methodsview functions.
For a workaround, see Display .NET Generic Methods Using Reflection. |
Creating an instance of a nested class. For a workaround, see Nested Classes. |
Saving (serializing) .NET objects into a MAT-file |
Creating .NET arrays with a specific lower bound |
Concatenating multiple .NET objects into an array |
Implementing interface methods |
Hosting .NET controls in figure windows |
Casting operations |
Calling constructors with ref or out type
arguments |
Using System.Console.WriteLine to write
text to the command window |
Pointer type arguments, function pointers, Dllimport keyword |
.NET remoting |
Using the MATLAB |
Adding event listeners to .NET events defined in static classes |
Handling .NET events with signatures that do not conform to the standard signature |
Creating empty .NET objects |
Creating .NET objects that do not belong to a namespace |