Main Content

Limitations to .NET Support

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 Use .NET 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
Pointer type arguments, function pointers, Dllimport keyword
.NET remoting

Using the MATLAB : (colon) operator in a foreach iteration

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

Related Topics