当我调用由Matlab创建的类时,我得到一个例外

时间:2016-02-20 17:29:43

标签: c# matlab

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
using Opera;

namespace WebApplication1
{
    public partial class FirstWebPage : System.Web.UI.Page
{
    //Inheritance Matlab
    public MLApp.MLApp matlab = new MLApp.MLApp();
    public Array result;
    public String str;

    //Page First Loading function
    protected void Page_Load(object sender, EventArgs e)
    {


    }

    //When Log_in Button Clicked
    protected void Login_Button_Click(object sender, EventArgs e)
    {
        Operaclass opera = new Operaclass();

        result = opera.add(3,4);
        str = "" + result;
        result = opera.subtract(5, 4);
        str = str + ":::" + result;
        TextBox1.Text = ""+str;
        //matlab.Execute("questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes');");

    }
}
}

我在

收到错误
Operaclass opera = new Operaclass();

例外是

  

'Opera.Operaclass'的类型初始值设定项引发了异常。

Operaclass是Opera命名空间中的一个类。由Matlab创建的Opera.dll。

请帮助..

由于

0 个答案:

没有答案