| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
What Is the Microsoft .NET Framework? Benefits of the MATLAB .NET Interface Why Use the MATLAB .NET Interface? What's the Difference Between the MATLAB .NET Interface and MATLAB Builder NE? |
The Microsoft .NET Framework is an integral Windows component that provides a large body of precoded solutions to common program requirements, and manages the execution of programs written specifically for the Framework.
MATLAB software supports the .NET Framework on the Windows platform only.
The MATLAB .NET interface enables you to:
Create instances of .NET classes.
Interact with .NET applications via their class members.
Use the MATLAB .NET interface to take advantage of the capabilities of the Microsoft .NET Framework. For example:
You have a professionally developed .NET assembly and want to use it to do certain operations, such as access hardware.
You want to leverage the capabilities of programming in .NET (for example, you have existing C# programs).
You want to access existing Microsoft-supplied classes for .NET.
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 cell array, 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 |
| Creating an instance of a nested class |
| Saving (serializing) .NET objects into a MAT-file |
| Creating .NET arrays with a specific lower bound |
| Creating ragged (nonrectangular) .NET arrays |
| Concatenating multiple .NET objects into an array |
| Implementing interface methods |
| Hosting .NET controls in figure windows |
| Casting operations |
| Delegates, except for events |
| Non-Int32 underlying types for enumerations |
| Calling constructors with ref or out type arguments |
| Using System.Console.WriteLine to write text to the command window |
The MATLAB .NET interface is for MATLAB users who want to use .NET assemblies in MATLAB.
MATLAB® Builder™ NE (previously called .NET Builder) packages MATLAB functions so that .NET programmers can access them. It brings MATLAB into .NET applications. For more information about this product, follow the instructions for in the MATLAB Desktop Tools and Development Environment documentation.
The MATLAB interface to .NET is available on the Windows platform only.
You must have the Microsoft .NET Framework installed on your system. The MATLAB interface supports the features of the .NET Framework Version 2.0, and works with Version 2.0 or above.
To use a .NET application, refer to your product documentation for information about how to install the program and for details about its functionality.
For an example of using .NET in MATLAB, see:
For detailed information, see:
For a complete description of the .NET Framework, you need to consult outside resources.
One source of information is the Microsoft Developer Network at http://msdn.microsoft.com/en-us/default.aspx. You can explore the .NET Framework Development Center or search the MSDN® site for the term ".NET Framework". The .NET Framework Class Library is a programming reference manual. Many examples in this documentation refer to classes in this library. There are different versions of the .NET Framework documentation. See Requirements for information about version support in MATLAB.
![]() | MATLAB Interface to .NET Framework | Getting Started with .NET | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |