Main Content

本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。

Microsoft .NET 快速入门

有助于您迅速地在 MATLAB® 中开始使用 .NET 的示例和概念

.NET 接口允许您将 .NET 程序集引入 MATLAB 环境中,从这些程序集中包含的类来构造对象,以及对这些对象调用方法。

MATLAB 仅在 Windows® 平台上支持 .NET Framework。

函数

NET.addAssembly将 .NET 程序集添加至 MATLAB
NET.isNETSupported检查支持的 Microsoft .NET Framework
NETMATLAB .NET 接口函数摘要
enableNETfromNetworkDrive(将删除)支持从网络驱动器访问 .NET 命令

NET.Assembly.NET 程序集成员
NET.NetException捕获 .NET 异常的错误信息

主题

Access a Simple .NET Class

This example shows how to access .NET functionality already installed on your system.

Load a Global .NET Assembly

This example shows you how to make .NET classes visible to MATLAB.

Work with Microsoft Excel Spreadsheets Using .NET

This example uses the Microsoft.Office.Interop.Excel.ApplicationClass class to create a spreadsheet, copy MATLAB data to it, and then close it.

Work with Microsoft Word Documents Using .NET

This example uses the Microsoft.Office.Interop.Word.ApplicationClass class to create a Word document.

Build a .NET Application for MATLAB Examples

Basic information for building the .NET examples included with MATLAB.

Simplify .NET Class Names

Use the MATLAB import function to refer to .NET class names.

在 MATLAB 函数中使用 import

NET.addAssemblyimport 函数的使用规范。

Nested Classes

Using reflection to instantiate a nested class.

Handle .NET Exceptions

MATLAB catches exceptions thrown by .NET and converts them into a NET.NetException object.

Assembly Is Library of .NET Classes

An assembly is a collection of types and resources built to work together and form a logical unit of functionality in .NET Framework applications.

System Requirements for Using MATLAB Interface to .NET

Using a supported version of the .NET Framework.

Using .NET from MATLAB

How you can benefit from using .NET from MATLAB.

Using a .NET Object

How to create a .NET object.

.NET Terminology

Understanding namespaces and reference and value types.

疑难解答

Troubleshooting Security Policy Settings from Network Drives

For MATLAB releases R2012b or earlier, call the enableNETfromNetworkDrive function to create a MATLAB security policy entry.

Limitations to .NET Support

.NET features not supported in MATLAB.

Limitations to Support of .NET Arrays

.NET features not supported in MATLAB.

Limitations to Support of .NET Methods

.NET features not supported in MATLAB.

Limitations to Support of .NET Events

.NET features not supported in MATLAB.

Limitations to Support of .NET Delegates

.NET features not supported in MATLAB.

Limitations to Support of .NET Enumerations

.NET features not supported in MATLAB.