From: Aris David on
Hi All,

Tools Used:
Matlab R2009a
Microsoft C# 2010

I have written a Function in Matlab called yahooTickers. I used the Matlab Builder for .Net to convert the yahooTickers function into a .Net DLL.

Within my C# 2010 solution, I've referenced the MWArray v2.0 from Matlab and the yahooTickers DLL which I named yahooTickers.

To access the function within this dll...I wrote the following lines...so that when button 1 is click the tickers will access the yahooTickers function within the DLL..

private void button1_Click(object sender, EventArgs e)
{
yahooTickers.YahooTickers yticker = new yahooTickers.YahooTickers();
MWArray tickers = yticker.yahooTickers(textBox1.Text);
}

The problem is I get the following error when I click on the button
The type initializer for 'yahooTickers.YahooTickers' threw an exception.

Code plus error can be viewed in the link below
http://tinypic.com/view.php?pic=2my8eav&s=3

Is there a workaround or solution to this issue...With Visual C#2008 everything works fine!

Thanks