NET.addAssembly
Package:NET
Make .NET assembly visible toMATLAB
Syntax
asmInfo = NET.addAssembly(globalName)
asmInfo = NET.addAssembly(privateName)
Description
loads a global .NET assembly into MATLAB®.asmInfo
= NET.addAssembly(globalName
)
loads a private .NET assembly.asmInfo
= NET.addAssembly(privateName
)
Limitations
NET.addAssembly
does not support assemblies generated by theMATLAB Compiler SDK™product.
Input Arguments
|
One of the following:
|
|
String or character vector representing the full path of a private assembly. |
Output Arguments
|
|
Examples
Display today’s date usingSystem.DateTime
in themscorlib
assembly.
System.DateTime.Now.ToLongDateString
Call theSystem.Windows.Forms.MessageBox.Show
method in the global assemblySystem.Windows.Forms
.
asm = NET.addAssembly('System.Windows.Forms'); importSystem.Windows.Forms.*MessageBox.Show('Simple Message Box')
Display classes in the private assemblyNetSample.dll
.
asm = NET.addAssembly('c:\work\NetSample.dll'); asm.Classes
Tips
You do not need to call
NET.addAssembly
to access classes in themscorlib.dll
andsystem.dll
assemblies. MATLAB dynamically loads these assemblies from the .NET Framework class library the first time you type "NET.
" or "System.
".Refer to your .NET product documentation for the name of the assembly and its deployment type (global or private).