| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
Make .NET assembly visible to MATLAB
asminfo = NET.addAssembly(assemblyname)
asminfo = NET.addAssembly(assemblyname) loads .NET assembly assemblyname into MATLAB. The assemblyname argument is a string representing the name of a global assembly, a string representing the full path of a private assembly, or an instance of System.Reflection.AssemblyName class. Returns NET.Assembly object asminfo.
For more information about assemblies, see What Is an Assembly?. To find information about the System.Reflection.AssemblyName class, see To Learn More About the .NET Framework.
Load an assembly located in the Global Assembly Cache (GAC) by specifying the short name:
asm = NET.addAssembly('System.Windows.Forms');
import System.Windows.Forms.*;
MessageBox.Show('Simple Message Box')Use pseudocode to load a private assembly MLDotNetTest.dll in the c:\work directory:
NET.addAssembly('c:\work\MLDotNetTest.dll');![]() | NET | NET.Assembly class | ![]() |

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 |