Hello folks,
I am a newbie to c#.net. In my very first project I have to gain access to JavaBeans which are accessable as dll. Has anybody an idea how this works.
Compilation is ok but an exception always occurs at runtime. For I use a german version of Microsoft Visual C#.NET I have to translate the exceptions message into English, I hope you can figure out what it means.
Here is the exception:
A non caught exception of type System.NullReferenceException has occured.
Additional info: the object reference was not fixed to an object instance.
My JavaBeans name is LabelBean (exists in LabelBean.dll). I added LabelBean to my project references. Heres a code sniplet:
=====================
...
using LabelBean;
...
namespace MyFirst
{
public class Form1 : System.Windows.Forms.Form
{
private LabelBean.LabelBeanClass bean;
}
public Form1()
{
InitializeComponent();
// this line throws the exception at runtime
this.bean = new LabelBean.LabelBeanClass();
}
...
}
=====================
I appreciate any help. I really have got stuck with this JavaBean.
Thank you.
ibjs
I am a newbie to c#.net. In my very first project I have to gain access to JavaBeans which are accessable as dll. Has anybody an idea how this works.
Compilation is ok but an exception always occurs at runtime. For I use a german version of Microsoft Visual C#.NET I have to translate the exceptions message into English, I hope you can figure out what it means.
Here is the exception:
A non caught exception of type System.NullReferenceException has occured.
Additional info: the object reference was not fixed to an object instance.
My JavaBeans name is LabelBean (exists in LabelBean.dll). I added LabelBean to my project references. Heres a code sniplet:
=====================
...
using LabelBean;
...
namespace MyFirst
{
public class Form1 : System.Windows.Forms.Form
{
private LabelBean.LabelBeanClass bean;
}
public Form1()
{
InitializeComponent();
// this line throws the exception at runtime
this.bean = new LabelBean.LabelBeanClass();
}
...
}
=====================
I appreciate any help. I really have got stuck with this JavaBean.
Thank you.
ibjs